version.c 1.19 KB
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1 2 3 4 5 6 7 8
/*
 *  linux/init/version.c
 *
 *  Copyright (C) 1992  Theodore Ts'o
 *
 *  May be freely distributed as part of Linux.
 */

9
#include <generated/compile.h>
10
#include <linux/export.h>
Linus Torvalds's avatar
Linus Torvalds committed
11 12
#include <linux/uts.h>
#include <linux/utsname.h>
13
#include <generated/utsrelease.h>
Linus Torvalds's avatar
Linus Torvalds committed
14
#include <linux/version.h>
15
#include <linux/proc_ns.h>
Linus Torvalds's avatar
Linus Torvalds committed
16

17
#ifndef CONFIG_KALLSYMS
Linus Torvalds's avatar
Linus Torvalds committed
18 19 20
#define version(a) Version_ ## a
#define version_string(a) version(a)

21
extern int version_string(LINUX_VERSION_CODE);
Linus Torvalds's avatar
Linus Torvalds committed
22
int version_string(LINUX_VERSION_CODE);
23
#endif
Linus Torvalds's avatar
Linus Torvalds committed
24

25
struct uts_namespace init_uts_ns = {
26
	.kref = KREF_INIT(2),
27 28 29 30 31 32 33 34
	.name = {
		.sysname	= UTS_SYSNAME,
		.nodename	= UTS_NODENAME,
		.release	= UTS_RELEASE,
		.version	= UTS_VERSION,
		.machine	= UTS_MACHINE,
		.domainname	= UTS_DOMAINNAME,
	},
35
	.user_ns = &init_user_ns,
36
	.ns.inum = PROC_UTS_INIT_INO,
37 38 39
#ifdef CONFIG_UTS_NS
	.ns.ops = &utsns_operations,
#endif
Linus Torvalds's avatar
Linus Torvalds committed
40
};
41
EXPORT_SYMBOL_GPL(init_uts_ns);
42

43 44
/* FIXED STRINGS! Don't touch! */
const char linux_banner[] =
45 46 47 48 49 50 51
	"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
	LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";

const char linux_proc_banner[] =
	"%s version %s"
	" (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
	" (" LINUX_COMPILER ") %s\n";