aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/Config.src8
-rw-r--r--coreutils/uname.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/coreutils/Config.src b/coreutils/Config.src
index 02155d220..ffbef1a31 100644
--- a/coreutils/Config.src
+++ b/coreutils/Config.src
@@ -630,6 +630,14 @@ config UNAME
630 help 630 help
631 uname is used to print system information. 631 uname is used to print system information.
632 632
633config UNAME_OSNAME
634 string "Operating system name"
635 default "GNU/Linux"
636 depends on UNAME
637 help
638 Sets the operating system name reported by uname -o. The
639 default is "GNU/Linux".
640
633config UNEXPAND 641config UNEXPAND
634 bool "unexpand" 642 bool "unexpand"
635 default y 643 default y
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 1c6aa5f79..fd677d27c 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -74,7 +74,7 @@ typedef struct {
74 struct utsname name; 74 struct utsname name;
75 char processor[sizeof(((struct utsname*)NULL)->machine)]; 75 char processor[sizeof(((struct utsname*)NULL)->machine)];
76 char platform[sizeof(((struct utsname*)NULL)->machine)]; 76 char platform[sizeof(((struct utsname*)NULL)->machine)];
77 char os[sizeof("GNU/Linux")]; 77 char os[sizeof(CONFIG_UNAME_OSNAME)];
78} uname_info_t; 78} uname_info_t;
79 79
80static const char options[] ALIGN1 = "snrvmpioa"; 80static const char options[] ALIGN1 = "snrvmpioa";
@@ -141,7 +141,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv)
141#endif 141#endif
142 strcpy(uname_info.processor, unknown_str); 142 strcpy(uname_info.processor, unknown_str);
143 strcpy(uname_info.platform, unknown_str); 143 strcpy(uname_info.platform, unknown_str);
144 strcpy(uname_info.os, "GNU/Linux"); 144 strcpy(uname_info.os, CONFIG_UNAME_OSNAME);
145#if 0 145#if 0
146 /* Fedora does something like this */ 146 /* Fedora does something like this */
147 strcpy(uname_info.processor, uname_info.name.machine); 147 strcpy(uname_info.processor, uname_info.name.machine);