summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/03_make-uname-info-os-configurable.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/patches/03_make-uname-info-os-configurable.patch b/patches/03_make-uname-info-os-configurable.patch
new file mode 100644
index 0000000..2915f5b
--- /dev/null
+++ b/patches/03_make-uname-info-os-configurable.patch
@@ -0,0 +1,57 @@
+Author: "P. J. McDermott" <pjm@nac.net>
+Subject: uname: Make uname_info.os configurable.
+
+This thread reminded me to make this correction:
+ http://lists.busybox.net/pipermail/busybox/2013-September/079749.html
+
+diff -Naur src.orig/coreutils/Config.src src/coreutils/Config.src
+--- src.orig/coreutils/Config.src 2013-05-11 19:30:43.000000000 -0400
++++ src/coreutils/Config.src 2013-09-20 17:49:16.357733865 -0400
+@@ -673,6 +673,16 @@
+ help
+ uname is used to print system information.
+
++config FEATURE_UNAME_OS_NAME
++ string "Operating system name"
++ default "BusyBox/Linux"
++ depends on UNAME
++ help
++ This is the operating system name as reported with the -o and -a
++ options.
++
++ This should be changed if BusyBox isn't your main userspace.
++
+ config UNEXPAND
+ bool "unexpand"
+ default y
+diff -Naur src.orig/coreutils/uname.c src/coreutils/uname.c
+--- src.orig/coreutils/uname.c 2013-05-11 19:30:43.000000000 -0400
++++ src/coreutils/uname.c 2013-09-20 18:12:05.186067343 -0400
+@@ -62,7 +62,8 @@
+ //usage:
+ //usage:#define uname_example_usage
+ //usage: "$ uname -a\n"
+-//usage: "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n"
++//usage: "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 "
++//usage: CONFIG_FEATURE_UNAME_OS_NAME "\n"
+
+ #include "libbb.h"
+ /* After libbb.h, since it needs sys/types.h on some systems */
+@@ -72,7 +72,7 @@
+ struct utsname name;
+ char processor[sizeof(((struct utsname*)NULL)->machine)];
+ char platform[sizeof(((struct utsname*)NULL)->machine)];
+- char os[sizeof("GNU/Linux")];
++ char os[sizeof(CONFIG_FEATURE_UNAME_OS_NAME)];
+ } uname_info_t;
+
+ static const char options[] ALIGN1 = "snrvmpioa";
+@@ -139,7 +139,7 @@
+ #endif
+ strcpy(uname_info.processor, unknown_str);
+ strcpy(uname_info.platform, unknown_str);
+- strcpy(uname_info.os, "GNU/Linux");
++ strcpy(uname_info.os, CONFIG_FEATURE_UNAME_OS_NAME);
+ #if 0
+ /* Fedora does something like this */
+ strcpy(uname_info.processor, uname_info.name.machine);