From 7839af22e87a48822e9f10779767c1a5e98e57d1 Mon Sep 17 00:00:00 2001 From: Alex John Date: Fri, 3 Apr 2020 00:49:33 +0800 Subject: [PATCH] libzfs_pool: Remove unused check for ENOTBLK Commit 379ca9c removed the check on aux devices to be block devices also changing zfs_ioctl(hdl, ZFS_IOC_VDEV_ADD, ...) and zfs_ioctl(hdl, ZFS_IOC_POOL_CREATE, ...) to never set ENOTBLK. This change removes the dangling check for ENOTBLK that will never trigger. Reported-by: Richard Elling Signed-off-by: Alex John --- lib/libzfs/libzfs_pool.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index e0610a631e0e..06c85f145f82 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -1351,11 +1351,6 @@ zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot, "one or more devices is out of space")); return (zfs_error(hdl, EZFS_BADDEV, msg)); - case ENOTBLK: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "cache device must be a disk or disk slice")); - return (zfs_error(hdl, EZFS_BADDEV, msg)); - default: return (zpool_standard_error(hdl, errno, msg)); } @@ -1543,12 +1538,6 @@ zpool_add(zpool_handle_t *zhp, nvlist_t *nvroot) (void) zfs_error(hdl, EZFS_BADVERSION, msg); break; - case ENOTBLK: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "cache device must be a disk or disk slice")); - (void) zfs_error(hdl, EZFS_BADDEV, msg); - break; - default: (void) zpool_standard_error(hdl, errno, msg); }