/*
* linux/version.c
*
* Copyright (C) 1992 Theodore Ts'o
*
* May be freely distributed as part of Linux.
*/
#include <linux/config.h>
#include <linux/utsname.h>
#include "./version.h"
//在执行make过程中,会在tools目录下生成version.h文件
//在version.h确定system_utsname结构体中各项的具体值
struct new_utsname system_utsname = {
UTS_SYSNAME, UTS_NODENAME, UTS_RELEASE, UTS_VERSION,
UTS_MACHINE, UTS_DOMAINNAME
};
char *linux_banner =
"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
LINUX_COMPILE_HOST ") " UTS_VERSION "
";
在执行make过程中会创建此文件所需的头文件version.h,在version.h会定义相关变量的值