diff options
author | Tom Caputi <[email protected]> | 2018-12-07 13:54:38 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-12-07 10:54:38 -0800 |
commit | 4b611761bd09718c267d5e3dcb3ded62e3a545df (patch) | |
tree | a6cec6cbe05f31bbc6330afaed7bbfbccc0d6fa9 /lib/libzfs | |
parent | ef57371a92367394108a5f65cee3c00d50101a4d (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tom Caputi <[email protected]>
Closes #8187
Diffstat (limited to 'lib/libzfs')
-rw-r--r-- | lib/libzfs/libzfs_util.c | 6 |
1 files 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); } /* |