diff options
author | Serge E. Hallyn <serue@us.ibm.com> | 2006-10-02 02:18:14 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 07:57:21 -0700 |
commit | 4865ecf1315b450ab3317a745a6678c04d311e40 (patch) | |
tree | 6cf5d3028f8642eba2a8094eb413db080cc9219c /init/version.c | |
parent | 96b644bdec977b97a45133e5b4466ba47a7a5e65 (diff) | |
download | linux-4865ecf1315b450ab3317a745a6678c04d311e40.tar.gz linux-4865ecf1315b450ab3317a745a6678c04d311e40.tar.bz2 linux-4865ecf1315b450ab3317a745a6678c04d311e40.zip |
[PATCH] namespaces: utsname: implement utsname namespaces
This patch defines the uts namespace and some manipulators.
Adds the uts namespace to task_struct, and initializes a
system-wide init namespace.
It leaves a #define for system_utsname so sysctl will compile.
This define will be removed in a separate patch.
[akpm@osdl.org: build fix, cleanup]
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init/version.c')
-rw-r--r-- | init/version.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/init/version.c b/init/version.c index e290802c6bd2..8f28344d9c70 100644 --- a/init/version.c +++ b/init/version.c @@ -12,22 +12,27 @@ #include <linux/utsname.h> #include <linux/utsrelease.h> #include <linux/version.h> +#include <linux/sched.h> #define version(a) Version_ ## a #define version_string(a) version(a) int version_string(LINUX_VERSION_CODE); -struct new_utsname system_utsname = { - .sysname = UTS_SYSNAME, - .nodename = UTS_NODENAME, - .release = UTS_RELEASE, - .version = UTS_VERSION, - .machine = UTS_MACHINE, - .domainname = UTS_DOMAINNAME, +struct uts_namespace init_uts_ns = { + .kref = { + .refcount = ATOMIC_INIT(2), + }, + .name = { + .sysname = UTS_SYSNAME, + .nodename = UTS_NODENAME, + .release = UTS_RELEASE, + .version = UTS_VERSION, + .machine = UTS_MACHINE, + .domainname = UTS_DOMAINNAME, + }, }; - -EXPORT_SYMBOL(system_utsname); +EXPORT_SYMBOL_GPL(init_uts_ns); const char linux_banner[] = "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" |