From: Tom Caputi Date: Fri, 7 Dec 2018 18:54:38 +0000 (-0500) Subject: Fix error message when zfs module is not loaded X-Git-Tag: zfs-0.8.0-rc3~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b611761bd09718c267d5e3dcb3ded62e3a545df;p=zfs 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 --- 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); } /*