From 99639e4a13306c3809b52e487d4343d756fad2e2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 19 Feb 2009 11:26:17 -0800 Subject: Add zone_get_hostid() function Minimal support added for the zone_get_hostid() function. Only global zones are supported therefore this function must be called with a NULL argumment. Additionally, I've added the HW_HOSTID_LEN define and updated all instances where a hard coded magic value of 11 was used; "A good riddance of bad rubbish!" --- include/sys/proc.h | 1 + include/sys/sysmacros.h | 1 + include/sys/systeminfo.h | 5 +++++ 3 files changed, 7 insertions(+) (limited to 'include/sys') diff --git a/include/sys/proc.h b/include/sys/proc.h index ab2425ce8..a4b1da55a 100644 --- a/include/sys/proc.h +++ b/include/sys/proc.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 03e72a145..923cc22e7 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -143,6 +143,7 @@ extern int p0; /* Missing misc functions */ extern int highbit(unsigned long i); +extern uint32_t zone_get_hostid(void *zone); #define makedevice(maj,min) makedev(maj,min) diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h index e297f2a5a..0e8934554 100644 --- a/include/sys/systeminfo.h +++ b/include/sys/systeminfo.h @@ -1,4 +1,9 @@ #ifndef _SPL_SYSTEMINFO_H #define _SPL_SYSTEMINFO_H +#define HW_INVALID_HOSTID 0xFFFFFFFF /* an invalid hostid */ +#define HW_HOSTID_LEN 11 /* minimum buffer size needed */ + /* to hold a decimal or hex */ + /* hostid string */ + #endif /* SPL_SYSTEMINFO_H */ -- cgit v1.2.3