diff options
author | pjd <pjd@FreeBSD.org> | 2007-04-08 16:29:25 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-04-08 16:29:25 +0000 |
commit | 2b260dcd5e356a3d85c66dff3715260105c412f7 (patch) | |
tree | 414979d8bf91ece25474dc6b933621fc94bb051b /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c | |
parent | 4b06e89211feda93bee19a93c165c0d4b9911622 (diff) | |
download | FreeBSD-src-2b260dcd5e356a3d85c66dff3715260105c412f7.zip FreeBSD-src-2b260dcd5e356a3d85c66dff3715260105c412f7.tar.gz |
MFp4: Synchronize with recent OpenSolaris changes.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c index b5d8c38..a7498ff 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c @@ -34,6 +34,7 @@ #include <sys/fs/zfs.h> #include <sys/vdev_impl.h> #include <sys/zfs_ioctl.h> +#include <sys/utsname.h> #ifdef _KERNEL #include <sys/kobj.h> #endif @@ -268,6 +269,7 @@ spa_config_generate(spa_t *spa, vdev_t *vd, uint64_t txg, int getstats) { nvlist_t *config, *nvroot; vdev_t *rvd = spa->spa_root_vdev; + unsigned long hostid = 0; ASSERT(spa_config_held(spa, RW_READER)); @@ -292,6 +294,11 @@ spa_config_generate(spa_t *spa, vdev_t *vd, uint64_t txg, int getstats) txg) == 0); VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_POOL_GUID, spa_guid(spa)) == 0); + (void) ddi_strtoul(hw_serial, NULL, 10, &hostid); + VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_HOSTID, + hostid) == 0); + VERIFY(nvlist_add_string(config, ZPOOL_CONFIG_HOSTNAME, + utsname.nodename) == 0); if (vd != rvd) { VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_TOP_GUID, |