aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-03 03:46:14 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-03 03:46:14 +0200
commit663ae52676eae3b0fdc6bb968ff6497279a034a4 (patch)
tree49d8011eebedc3a6c47b7c8703b2b6e640f6fb0c
parent819b47aa357c33bf84919495795b36f8c1faa3ac (diff)
downloadbusybox-w32-663ae52676eae3b0fdc6bb968ff6497279a034a4.tar.gz
busybox-w32-663ae52676eae3b0fdc6bb968ff6497279a034a4.tar.bz2
busybox-w32-663ae52676eae3b0fdc6bb968ff6497279a034a4.zip
config: FEDORA_COMPAT option (so far only tweaks uname)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--Config.in13
-rw-r--r--coreutils/uname.c2
2 files changed, 14 insertions, 1 deletions
diff --git a/Config.in b/Config.in
index acd3cb883..1bc214e44 100644
--- a/Config.in
+++ b/Config.in
@@ -37,6 +37,19 @@ config EXTRA_COMPAT
37 some GNU extensions in libc. You probably only need this option 37 some GNU extensions in libc. You probably only need this option
38 if you plan to run busybox on desktop. 38 if you plan to run busybox on desktop.
39 39
40config FEDORA_COMPAT
41 bool "Building for Fedora distribution"
42 default n
43 help
44 This option makes some tools behave like they do on Fedora.
45
46 At the time of this writing (2017-08) this only affects uname:
47 normally, uname -p (processor) and uname -i (platform)
48 are shown as "unknown", but with this option uname -p
49 shows the same string as uname -m (machine type),
50 and so does uname -i unless machine type is i486/i586/i686 -
51 then uname -i shows "i386".
52
40config INCLUDE_SUSv2 53config INCLUDE_SUSv2
41 bool "Enable obsolete features removed before SUSv3" 54 bool "Enable obsolete features removed before SUSv3"
42 default y 55 default y
diff --git a/coreutils/uname.c b/coreutils/uname.c
index d6e447e33..be9a3f90d 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -183,7 +183,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
183 strcpy(uname_info.processor, unknown_str); 183 strcpy(uname_info.processor, unknown_str);
184 strcpy(uname_info.platform, unknown_str); 184 strcpy(uname_info.platform, unknown_str);
185 strcpy(uname_info.os, CONFIG_UNAME_OSNAME); 185 strcpy(uname_info.os, CONFIG_UNAME_OSNAME);
186# if 0 186# if ENABLE_FEDORA_COMPAT
187 /* Fedora does something like this */ 187 /* Fedora does something like this */
188 strcpy(uname_info.processor, uname_info.name.machine); 188 strcpy(uname_info.processor, uname_info.name.machine);
189 strcpy(uname_info.platform, uname_info.name.machine); 189 strcpy(uname_info.platform, uname_info.name.machine);