mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
[PATCH] Fix linux banner utsname information
utsname information is shown in the linux banner, which also is used for /proc/version (which can have different utsname values inside a uts namespaces). this patch makes the varying data arguments and changes the string to a format string, using those arguments. Signed-off-by: Herbert Poetzl <herbert@13thfloor.at> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
6e2ac66470
commit
a2ee8649ba
@@ -252,8 +252,8 @@ static int version_read_proc(char *page, char **start, off_t off,
|
|||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
strcpy(page, linux_banner);
|
len = sprintf(page, linux_banner,
|
||||||
len = strlen(page);
|
utsname()->release, utsname()->version);
|
||||||
return proc_calc_metrics(page, start, off, count, eof, len);
|
return proc_calc_metrics(page, start, off, count, eof, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,6 +15,7 @@ clean-files := ../include/linux/compile.h
|
|||||||
|
|
||||||
# dependencies on generated files need to be listed explicitly
|
# dependencies on generated files need to be listed explicitly
|
||||||
|
|
||||||
|
$(obj)/main.o: include/linux/compile.h
|
||||||
$(obj)/version.o: include/linux/compile.h
|
$(obj)/version.o: include/linux/compile.h
|
||||||
|
|
||||||
# compile.h changes depending on hostname, generation number, etc,
|
# compile.h changes depending on hostname, generation number, etc,
|
||||||
|
@@ -50,6 +50,8 @@
|
|||||||
#include <linux/buffer_head.h>
|
#include <linux/buffer_head.h>
|
||||||
#include <linux/debug_locks.h>
|
#include <linux/debug_locks.h>
|
||||||
#include <linux/lockdep.h>
|
#include <linux/lockdep.h>
|
||||||
|
#include <linux/utsrelease.h>
|
||||||
|
#include <linux/compile.h>
|
||||||
|
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/bugs.h>
|
#include <asm/bugs.h>
|
||||||
@@ -506,7 +508,7 @@ asmlinkage void __init start_kernel(void)
|
|||||||
boot_cpu_init();
|
boot_cpu_init();
|
||||||
page_address_init();
|
page_address_init();
|
||||||
printk(KERN_NOTICE);
|
printk(KERN_NOTICE);
|
||||||
printk(linux_banner);
|
printk(linux_banner, UTS_RELEASE, UTS_VERSION);
|
||||||
setup_arch(&command_line);
|
setup_arch(&command_line);
|
||||||
unwind_setup();
|
unwind_setup();
|
||||||
setup_per_cpu_areas();
|
setup_per_cpu_areas();
|
||||||
|
@@ -35,5 +35,6 @@ struct uts_namespace init_uts_ns = {
|
|||||||
EXPORT_SYMBOL_GPL(init_uts_ns);
|
EXPORT_SYMBOL_GPL(init_uts_ns);
|
||||||
|
|
||||||
const char linux_banner[] =
|
const char linux_banner[] =
|
||||||
"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
|
"Linux version %s (" LINUX_COMPILE_BY "@"
|
||||||
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
|
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") %s\n";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user