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:
Ryan Moeller
2020-08-30 17:37:44 +00:00
committed by Brian Behlendorf
parent eff621071f
commit 46b7d53baf
4 changed files with 50 additions and 43 deletions
+4 -3
View File
@@ -27,7 +27,6 @@ USER_C = \
strlcat.c \
strlcpy.c \
timestamp.c \
zone.c \
include/sys/list.h \
include/sys/list_impl.h
@@ -35,7 +34,8 @@ if BUILD_LINUX
USER_C += \
os/linux/getexecname.c \
os/linux/gethostid.c \
os/linux/getmntany.c
os/linux/getmntany.c \
os/linux/zone.c
endif
if BUILD_FREEBSD
@@ -43,7 +43,8 @@ USER_C += \
os/freebsd/getexecname.c \
os/freebsd/gethostid.c \
os/freebsd/getmntany.c \
os/freebsd/mnttab.c
os/freebsd/mnttab.c \
os/freebsd/zone.c
endif
libspl_la_SOURCES = \