summaryrefslogtreecommitdiffstats
path: root/lib/libzfs
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2015-01-23 16:05:04 +0800
committerBrian Behlendorf <[email protected]>2015-02-04 16:44:53 -0800
commit53698a453d1cc318f99477fef596c476b4b0cb47 (patch)
treedf07069d67116be61722e8c8713e500a61c43fd2 /lib/libzfs
parentaa2ef419e46b3ad7c2ad8848b7a308a5a949aba7 (diff)
Read spl_hostid module parameter before gethostid()
If spl_hostid is set via module parameter, it's likely different from gethostid(). Therefore, the userspace tool should read it first before falling back to gethostid(). Signed-off-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3034
Diffstat (limited to 'lib/libzfs')
-rw-r--r--lib/libzfs/libzfs_status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_status.c b/lib/libzfs/libzfs_status.c
index 534ff853a..f69bd4544 100644
--- a/lib/libzfs/libzfs_status.c
+++ b/lib/libzfs/libzfs_status.c
@@ -195,7 +195,7 @@ check_status(nvlist_t *config, boolean_t isimport, zpool_errata_t *erratap)
uint64_t suspended;
uint64_t hostid = 0;
uint64_t errata = 0;
- unsigned long system_hostid = gethostid() & 0xffffffff;
+ unsigned long system_hostid = get_system_hostid();
verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION,
&version) == 0);