From 4b611761bd09718c267d5e3dcb3ded62e3a545df Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Fri, 7 Dec 2018 13:54:38 -0500 Subject: [PATCH] Fix error message when zfs module is not loaded This patch corrects a small issue where the wrong error message was being displayed when the zfs kernel module was not loaded. This also avoids waiting for the (by default) 10s timeout to see if the /dev/zfs device appears. Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Tom Caputi Closes #8187 --- lib/libzfs/libzfs_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index 9f4fe3b72..776d887a2 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -907,10 +907,10 @@ libzfs_load_module(const char *module) if (load) { if (libzfs_run_process("/sbin/modprobe", argv, 0)) return (ENOEXEC); - - if (!libzfs_module_loaded(module)) - return (ENXIO); } + + if (!libzfs_module_loaded(module)) + return (ENXIO); } /* -- 2.40.0