wok-6.x diff busybox/stuff/busybox-1.27-arch.u @ rev 21367
updated litmus (0.12.1 -> 0.13)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Apr 21 17:10:28 2019 +0100 (2019-04-21) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/busybox/stuff/busybox-1.27-arch.u Sun Apr 21 17:10:28 2019 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +--- busybox-1.27.2/coreutils/uname.c.org 1.5 ++++ busybox-1.27.2/coreutils/uname.c 1.6 +@@ -55,10 +55,18 @@ 1.7 + //config: help 1.8 + //config: Sets the operating system name reported by uname -o. The 1.9 + //config: default is "GNU/Linux". 1.10 ++//config: 1.11 ++//config:config ARCH_ALIAS 1.12 ++//config: bool "arch alias" 1.13 ++//config: default y 1.14 ++//config: help 1.15 ++//config: arch is an alias to uname -m. 1.16 + 1.17 +-//applet:IF_UNAME(APPLET(uname, BB_DIR_BIN, BB_SUID_DROP)) 1.18 ++//applet:IF_UNAME(APPLET_NOEXEC(uname, uname, BB_DIR_BIN, BB_SUID_DROP, uname)) 1.19 ++//applet:IF_ARCH_ALIAS(APPLET_NOEXEC(arch, uname, BB_DIR_BIN, BB_SUID_DROP, arch)) 1.20 + 1.21 + //kbuild:lib-$(CONFIG_UNAME) += uname.o 1.22 ++//kbuild:lib-$(CONFIG_ARCH_ALIAS) += uname.o 1.23 + 1.24 + /* BB_AUDIT SUSv3 compliant */ 1.25 + /* http://www.opengroup.org/onlinepubs/007904975/utilities/uname.html */ 1.26 +@@ -80,6 +88,11 @@ 1.27 + //usage:#define uname_example_usage 1.28 + //usage: "$ uname -a\n" 1.29 + //usage: "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" 1.30 ++//usage: 1.31 ++//usage:#define arch_trivial_usage 1.32 ++//usage: 1.33 ++//usage:#define arch_full_usage "\n\n" 1.34 ++//usage: "arch is an alias for uname -m" 1.35 + 1.36 + #include "libbb.h" 1.37 + /* After libbb.h, since it needs sys/types.h on some systems */ 1.38 +@@ -147,6 +160,12 @@ 1.39 + toprint = 1; 1.40 + } 1.41 + 1.42 ++ if (ENABLE_ARCH_ALIAS 1.43 ++ && (!ENABLE_UNAME || !applet_name[4]) 1.44 ++ ) { /* we are "arch" */ 1.45 ++ toprint = (1 << 4); 1.46 ++ } 1.47 ++ 1.48 + uname(&uname_info.name); /* never fails */ 1.49 + 1.50 + #if defined(__sparc__) && defined(__linux__)