aboutsummaryrefslogtreecommitdiffstats
path: root/init/version.c
diff options
context:
space:
mode:
authorSerge E. Hallyn <serue@us.ibm.com>2006-10-02 05:18:14 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-02 10:57:21 -0400
commit4865ecf1315b450ab3317a745a6678c04d311e40 (patch)
tree6cf5d3028f8642eba2a8094eb413db080cc9219c /init/version.c
parent96b644bdec977b97a45133e5b4466ba47a7a5e65 (diff)
[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.c23
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 @@
12#include <linux/utsname.h> 12#include <linux/utsname.h>
13#include <linux/utsrelease.h> 13#include <linux/utsrelease.h>
14#include <linux/version.h> 14#include <linux/version.h>
15#include <linux/sched.h>
15 16
16#define version(a) Version_ ## a 17#define version(a) Version_ ## a
17#define version_string(a) version(a) 18#define version_string(a) version(a)
18 19
19int version_string(LINUX_VERSION_CODE); 20int version_string(LINUX_VERSION_CODE);
20 21
21struct new_utsname system_utsname = { 22struct uts_namespace init_uts_ns = {
22 .sysname = UTS_SYSNAME, 23 .kref = {
23 .nodename = UTS_NODENAME, 24 .refcount = ATOMIC_INIT(2),
24 .release = UTS_RELEASE, 25 },
25 .version = UTS_VERSION, 26 .name = {
26 .machine = UTS_MACHINE, 27 .sysname = UTS_SYSNAME,
27 .domainname = UTS_DOMAINNAME, 28 .nodename = UTS_NODENAME,
29 .release = UTS_RELEASE,
30 .version = UTS_VERSION,
31 .machine = UTS_MACHINE,
32 .domainname = UTS_DOMAINNAME,
33 },
28}; 34};
29 35EXPORT_SYMBOL_GPL(init_uts_ns);
30EXPORT_SYMBOL(system_utsname);
31 36
32const char linux_banner[] = 37const char linux_banner[] =
33 "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" 38 "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"