mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Read the /etc/hostid file directly.
Deprecate the /usr/bin/hostid call by reading the /etc/hostid file directly. Add the spl_hostid_path parameter to override the default /etc/hostid path. Rename the set_hostid() function to hostid_exec() to better reflect actual behavior and complement the new hostid_read() function. Use HW_INVALID_HOSTID as the spl_hostid sentinel value because zero seems to be a valid gethostid() result on Linux.
This commit is contained in:
committed by
Brian Behlendorf
parent
bf0c60c060
commit
0d54dcb566
@@ -30,4 +30,8 @@
|
||||
/* to hold a decimal or hex */
|
||||
/* hostid string */
|
||||
|
||||
/* Supplemental definitions for Linux. */
|
||||
#define HW_HOSTID_PATH "/etc/hostid" /* binary configuration file */
|
||||
#define HW_HOSTID_MASK 0xFFFFFFFF /* significant hostid bits */
|
||||
|
||||
#endif /* SPL_SYSTEMINFO_H */
|
||||
|
||||
Reference in New Issue
Block a user