mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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!"
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <linux/sysctl.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include <sys/systeminfo.h>
|
||||
#include <sys/kmem.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/kstat.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)
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user