mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
libspl: Provide platform-specific zone implementations
FreeBSD has the concept of jails, a precursor to Solaris's zones, which can be mapped to the required zones interface with relative ease. The previous ZFS implementation in FreeBSD did so, and we should continue to provide an appropriate implementation in OpenZFS as well. Move lib/libspl/zone.c into platform code and adopt the correct implementation for FreeBSD. While here, prune unused code. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org> Closes #10851
This commit is contained in:
committed by
Brian Behlendorf
parent
d6a779a278
commit
f5ddb3b481
@@ -26,25 +26,16 @@
|
||||
#ifndef _LIBSPL_ZONE_H
|
||||
#define _LIBSPL_ZONE_H
|
||||
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/zone.h>
|
||||
#include <sys/priv.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GLOBAL_ZONEID 0
|
||||
#define GLOBAL_ZONEID_NAME "global"
|
||||
|
||||
/*
|
||||
* Functions for mapping between id and name for active zones.
|
||||
*/
|
||||
extern zoneid_t getzoneid(void);
|
||||
extern zoneid_t getzoneidbyname(const char *);
|
||||
extern ssize_t getzonenamebyid(zoneid_t, char *, size_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user