diff options
author | zec <zec@FreeBSD.org> | 2009-05-08 14:11:06 +0000 |
---|---|---|
committer | zec <zec@FreeBSD.org> | 2009-05-08 14:11:06 +0000 |
commit | 639797b2e609797fdaf2c8e88b9203bfc7c70b7e (patch) | |
tree | 070fe9c96176ed914dfefc12a45fea29b98c4122 /sys/cddl/compat/opensolaris/kern | |
parent | f851007175f37de5aec0c77eb852e3444150e653 (diff) | |
download | FreeBSD-src-639797b2e609797fdaf2c8e88b9203bfc7c70b7e.zip FreeBSD-src-639797b2e609797fdaf2c8e88b9203bfc7c70b7e.tar.gz |
Introduce a new virtualization container, provisionally named vprocg, to hold
virtualized instances of hostname and domainname, as well as a new top-level
virtualization struct vimage, which holds pointers to struct vnet and struct
vprocg. Struct vprocg is likely to become replaced in the near future with
a new jail management API import.
As a consequence of this change, change struct ucred to point to a struct
vimage, instead of directly pointing to a vnet.
Merge vnet / vimage / ucred refcounting infrastructure from p4 / vimage
branch.
Permit kldload / kldunload operations to be executed only from the default
vimage context.
This change should have no functional impact on nooptions VIMAGE kernel
builds.
Reviewed by: bz
Approved by: julian (mentor)
Diffstat (limited to 'sys/cddl/compat/opensolaris/kern')
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris.c | 3 | ||||
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris_misc.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris.c b/sys/cddl/compat/opensolaris/kern/opensolaris.c index f1f84fb..003120f 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris.c @@ -32,8 +32,10 @@ #include <sys/cpuvar.h> #include <sys/errno.h> #include <sys/kernel.h> +#include <sys/misc.h> #include <sys/module.h> #include <sys/mutex.h> +#include <sys/vimage.h> cpu_core_t cpu_core[MAXCPU]; kmutex_t cpu_lock; @@ -81,6 +83,7 @@ opensolaris_modevent(module_t mod __unused, int type, void *data __unused) switch (type) { case MOD_LOAD: + utsname.nodename = G_hostname; break; case MOD_UNLOAD: diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c b/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c index 279ae4c..af98827 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); char hw_serial[11] = "0"; struct opensolaris_utsname utsname = { - .nodename = hostname + .nodename = "unset" }; int |