diff options
author | Ron Yorston <rmy@frippery.org> | 2015-07-12 16:06:37 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-08-03 18:09:18 +0200 |
commit | 64ed5f0d3c5eefbb208d4a334654834c78be2cbd (patch) | |
tree | 78b7a32dfb2162234c9c70b982317d9f2aa520df /coreutils/uname.c | |
parent | b27cf31003774e5aa13491ccb8f1f0721dc5b920 (diff) | |
download | busybox-w32-64ed5f0d3c5eefbb208d4a334654834c78be2cbd.tar.gz busybox-w32-64ed5f0d3c5eefbb208d4a334654834c78be2cbd.tar.bz2 busybox-w32-64ed5f0d3c5eefbb208d4a334654834c78be2cbd.zip |
uname: make OS name configurable
A mailing list thread in September 2013 discussed changing the string
returned by the non-POSIX 'uname -o' option. Nothing ever came of this
because there was no agreement as to what the string should be.
Make the string configurable so that people can decide for themselves.
Signed-off-by: Ron Yorston <rmy@frippery.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/uname.c')
-rw-r--r-- | coreutils/uname.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 | ||
80 | static const char options[] ALIGN1 = "snrvmpioa"; | 80 | static 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); |