Correct zpool_vdev_remove() error message

The error message in zpool_vdev_remove() said top-level devices
could be removed, but that has never been true.

Reported-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
Closes #4506 
Closes #5213
This commit is contained in:
Richard Laager 2016-10-02 13:34:17 -05:00 committed by Brian Behlendorf
parent aecdc70604
commit d1502e9ed0

View File

@ -3126,8 +3126,8 @@ out:
} }
/* /*
* Remove the given device. Currently, this is supported only for hot spares * Remove the given device. Currently, this is supported only for hot spares,
* and level 2 cache devices. * cache, and log devices.
*/ */
int int
zpool_vdev_remove(zpool_handle_t *zhp, const char *path) zpool_vdev_remove(zpool_handle_t *zhp, const char *path)
@ -3151,7 +3151,7 @@ zpool_vdev_remove(zpool_handle_t *zhp, const char *path)
*/ */
if (!avail_spare && !l2cache && !islog) { if (!avail_spare && !l2cache && !islog) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"only inactive hot spares, cache, top-level, " "only inactive hot spares, cache, "
"or log devices can be removed")); "or log devices can be removed"));
return (zfs_error(hdl, EZFS_NODEVICE, msg)); return (zfs_error(hdl, EZFS_NODEVICE, msg));
} }