blob: ef4012ec43751122eea2e55e86f9b5ec8faad3c9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/init/version.c
3 *
4 * Copyright (C) 1992 Theodore Ts'o
5 *
6 * May be freely distributed as part of Linux.
7 */
8
Sam Ravnborg92045952009-10-18 00:36:47 +02009#include <generated/compile.h>
Laura Abbott9afb7192018-07-05 17:49:37 -070010#include <linux/build-salt.h>
Masahiro Yamadae4f02fd2017-11-17 15:29:10 -080011#include <linux/export.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <linux/uts.h>
13#include <linux/utsname.h>
Sam Ravnborg273b2812009-10-18 00:52:28 +020014#include <generated/utsrelease.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#include <linux/version.h>
David Howells0bb80f22013-04-12 01:50:06 +010016#include <linux/proc_ns.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
Daniel Guilak197dcff2008-07-25 01:45:50 -070018#ifndef CONFIG_KALLSYMS
Linus Torvalds1da177e2005-04-16 15:20:36 -070019#define version(a) Version_ ## a
20#define version_string(a) version(a)
21
Daniel Guilak277e2c62008-07-25 01:45:49 -070022extern int version_string(LINUX_VERSION_CODE);
Linus Torvalds1da177e2005-04-16 15:20:36 -070023int version_string(LINUX_VERSION_CODE);
Daniel Guilak197dcff2008-07-25 01:45:50 -070024#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Serge E. Hallyn4865ecf2006-10-02 02:18:14 -070026struct uts_namespace init_uts_ns = {
Peter Zijlstra1e24edc2016-11-14 17:12:23 +010027 .kref = KREF_INIT(2),
Serge E. Hallyn4865ecf2006-10-02 02:18:14 -070028 .name = {
29 .sysname = UTS_SYSNAME,
30 .nodename = UTS_NODENAME,
31 .release = UTS_RELEASE,
32 .version = UTS_VERSION,
33 .machine = UTS_MACHINE,
34 .domainname = UTS_DOMAINNAME,
35 },
Serge E. Hallyn59607db2011-03-23 16:43:16 -070036 .user_ns = &init_user_ns,
Al Viro435d5f42014-10-31 22:56:04 -040037 .ns.inum = PROC_UTS_INIT_INO,
Al Viro33c42942014-11-01 02:32:53 -040038#ifdef CONFIG_UTS_NS
39 .ns.ops = &utsns_operations,
40#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070041};
Serge E. Hallyn4865ecf2006-10-02 02:18:14 -070042EXPORT_SYMBOL_GPL(init_uts_ns);
Roman Zippel3eb3c742007-01-10 14:45:28 +010043
Linus Torvaldsc71551a2007-01-11 18:18:04 -080044/* FIXED STRINGS! Don't touch! */
45const char linux_banner[] =
Roman Zippel3eb3c742007-01-10 14:45:28 +010046 "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
47 LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
48
49const char linux_proc_banner[] =
50 "%s version %s"
51 " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
52 " (" LINUX_COMPILER ") %s\n";
Laura Abbott9afb7192018-07-05 17:49:37 -070053
54BUILD_SALT;