diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-04 02:22:17 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-04 02:22:17 +0200 |
commit | 21e5d0f841cfb1bee8751983c9a2bd199ec9eb75 (patch) | |
tree | e2076f629845f7986d1ef48d26e8ac36f8f7f36a | |
parent | cf792a58abc4fc55d0622333d0eb17c6a80dc497 (diff) | |
download | busybox-w32-21e5d0f841cfb1bee8751983c9a2bd199ec9eb75.tar.gz busybox-w32-21e5d0f841cfb1bee8751983c9a2bd199ec9eb75.tar.bz2 busybox-w32-21e5d0f841cfb1bee8751983c9a2bd199ec9eb75.zip |
config: FEDORA_COMPAT option (so far only tweaks uname)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | Config.in | 13 | ||||
-rw-r--r-- | coreutils/uname.c | 2 |
2 files changed, 14 insertions, 1 deletions
@@ -33,6 +33,19 @@ config EXTRA_COMPAT | |||
33 | some GNU extensions in libc. You probably only need this option | 33 | some GNU extensions in libc. You probably only need this option |
34 | if you plan to run busybox on desktop. | 34 | if you plan to run busybox on desktop. |
35 | 35 | ||
36 | config FEDORA_COMPAT | ||
37 | bool "Building for Fedora distribution" | ||
38 | default n | ||
39 | help | ||
40 | This option makes some tools behave like they do on Fedora. | ||
41 | |||
42 | At the time of this writing (2017-08) this only affects uname: | ||
43 | normally, uname -p (processor) and uname -i (platform) | ||
44 | are shown as "unknown", but with this option uname -p | ||
45 | shows the same string as uname -m (machine type), | ||
46 | and so does uname -i unless machine type is i486/i586/i686 - | ||
47 | then uname -i shows "i386". | ||
48 | |||
36 | config INCLUDE_SUSv2 | 49 | config INCLUDE_SUSv2 |
37 | bool "Enable obsolete features removed before SUSv3" | 50 | bool "Enable obsolete features removed before SUSv3" |
38 | default y | 51 | default y |
diff --git a/coreutils/uname.c b/coreutils/uname.c index 4d98fde25..0c0b85ca8 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -157,7 +157,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv) | |||
157 | strcpy(uname_info.processor, unknown_str); | 157 | strcpy(uname_info.processor, unknown_str); |
158 | strcpy(uname_info.platform, unknown_str); | 158 | strcpy(uname_info.platform, unknown_str); |
159 | strcpy(uname_info.os, CONFIG_UNAME_OSNAME); | 159 | strcpy(uname_info.os, CONFIG_UNAME_OSNAME); |
160 | #if 0 | 160 | #if ENABLE_FEDORA_COMPAT |
161 | /* Fedora does something like this */ | 161 | /* Fedora does something like this */ |
162 | strcpy(uname_info.processor, uname_info.name.machine); | 162 | strcpy(uname_info.processor, uname_info.name.machine); |
163 | strcpy(uname_info.platform, uname_info.name.machine); | 163 | strcpy(uname_info.platform, uname_info.name.machine); |