]> git.proxmox.com Git - mirror_spl.git/commit
Read the /etc/hostid file directly.
authorDarik Horn <dajhorn@vanadac.com>
Mon, 20 Jun 2011 19:53:56 +0000 (14:53 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 24 Jun 2011 16:58:03 +0000 (09:58 -0700)
commit0d54dcb56685ac58e68e46b7848f0f2c2863dc6e
tree2bd206a88dfe78b862361c6afc456ff2f3d5c1fa
parentbf0c60c060ac58c9bb835cb62b49f0cb68bb68e4
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.
include/sys/systeminfo.h
module/spl/spl-generic.c