version.c 1.1 KB
Newer Older
L
Linus Torvalds 已提交
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>
L
Linus Torvalds 已提交
10 11 12
#include <linux/module.h>
#include <linux/uts.h>
#include <linux/utsname.h>
13
#include <generated/utsrelease.h>
L
Linus Torvalds 已提交
14 15
#include <linux/version.h>

16
#ifndef CONFIG_KALLSYMS
L
Linus Torvalds 已提交
17 18 19
#define version(a) Version_ ## a
#define version_string(a) version(a)

20
extern int version_string(LINUX_VERSION_CODE);
L
Linus Torvalds 已提交
21
int version_string(LINUX_VERSION_CODE);
22
#endif
L
Linus Torvalds 已提交
23

24 25 26 27 28 29 30 31 32 33 34 35
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,
	},
L
Linus Torvalds 已提交
36
};
37
EXPORT_SYMBOL_GPL(init_uts_ns);
38

39 40
/* FIXED STRINGS! Don't touch! */
const char linux_banner[] =
41 42 43 44 45 46 47
	"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";