wok-current rev 20235
busybox: add arch (uname -m alias)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 05 15:52:59 2018 +0100 (2018-03-05) |
parents | 1f1f942f3404 |
children | e2ec3520cf88 |
files | busybox/receipt busybox/stuff/busybox-1.27-arch.u busybox/stuff/busybox-1.27.config busybox/stuff/busybox-1.27.config-ssfs busybox/stuff/busybox-1.27.config-static |
line diff
1.1 --- a/busybox/receipt Mon Mar 05 13:05:36 2018 +0100 1.2 +++ b/busybox/receipt Mon Mar 05 15:52:59 2018 +0100 1.3 @@ -49,6 +49,7 @@ 1.4 ash.u 1.5 httpd.u 1.6 df.u 1.7 +arch.u 1.8 EOT 1.9 cp $stuff/$PACKAGE-${VERSION%.*}.config .config 1.10 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/busybox/stuff/busybox-1.27-arch.u Mon Mar 05 15:52:59 2018 +0100 2.3 @@ -0,0 +1,47 @@ 2.4 +--- busybox-1.27.2/coreutils/uname.c.org 2.5 ++++ busybox-1.27.2/coreutils/uname.c 2.6 +@@ -55,10 +55,18 @@ 2.7 + //config: help 2.8 + //config: Sets the operating system name reported by uname -o. The 2.9 + //config: default is "GNU/Linux". 2.10 ++//config: 2.11 ++//config:config ARCH_ALIAS 2.12 ++//config: bool "arch alias" 2.13 ++//config: default y 2.14 ++//config: help 2.15 ++//config: arch is an alias to uname -m. 2.16 + 2.17 +-//applet:IF_UNAME(APPLET(uname, BB_DIR_BIN, BB_SUID_DROP)) 2.18 ++//applet:IF_UNAME(APPLET_NOEXEC(uname, uname, BB_DIR_BIN, BB_SUID_DROP, uname)) 2.19 ++//applet:IF_ARCH_ALIAS(APPLET_NOEXEC(arch, uname, BB_DIR_BIN, BB_SUID_DROP, arch)) 2.20 + 2.21 + //kbuild:lib-$(CONFIG_UNAME) += uname.o 2.22 ++//kbuild:lib-$(CONFIG_ARCH_ALIAS) += uname.o 2.23 + 2.24 + /* BB_AUDIT SUSv3 compliant */ 2.25 + /* http://www.opengroup.org/onlinepubs/007904975/utilities/uname.html */ 2.26 +@@ -80,6 +88,11 @@ 2.27 + //usage:#define uname_example_usage 2.28 + //usage: "$ uname -a\n" 2.29 + //usage: "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" 2.30 ++//usage: 2.31 ++//usage:#define arch_trivial_usage 2.32 ++//usage: 2.33 ++//usage:#define arch_full_usage "\n\n" 2.34 ++//usage: "arch is an alias for uname -m" 2.35 + 2.36 + #include "libbb.h" 2.37 + /* After libbb.h, since it needs sys/types.h on some systems */ 2.38 +@@ -147,6 +160,12 @@ 2.39 + toprint = 1; 2.40 + } 2.41 + 2.42 ++ if (ENABLE_ARCH_ALIAS 2.43 ++ && (!ENABLE_UNAME || !applet_name[4]) 2.44 ++ ) { /* we are "arch" */ 2.45 ++ toprint = (1 << 4); 2.46 ++ } 2.47 ++ 2.48 + uname(&uname_info.name); /* never fails */ 2.49 + 2.50 + #if defined(__sparc__) && defined(__linux__)
3.1 --- a/busybox/stuff/busybox-1.27.config Mon Mar 05 13:05:36 2018 +0100 3.2 +++ b/busybox/stuff/busybox-1.27.config Mon Mar 05 15:52:59 2018 +0100 3.3 @@ -321,6 +321,7 @@ 3.4 CONFIG_TTY=y 3.5 CONFIG_UNAME=y 3.6 CONFIG_UNAME_OSNAME="GNU/Linux" 3.7 +CONFIG_ARCH_ALIAS=y 3.8 CONFIG_UNIQ=y 3.9 # CONFIG_UNLINK is not set 3.10 CONFIG_USLEEP=y
4.1 --- a/busybox/stuff/busybox-1.27.config-ssfs Mon Mar 05 13:05:36 2018 +0100 4.2 +++ b/busybox/stuff/busybox-1.27.config-ssfs Mon Mar 05 15:52:59 2018 +0100 4.3 @@ -321,6 +321,7 @@ 4.4 CONFIG_TTY=y 4.5 CONFIG_UNAME=y 4.6 CONFIG_UNAME_OSNAME="GNU/Linux" 4.7 +CONFIG_ARCH_ALIAS=y 4.8 CONFIG_UNIQ=y 4.9 # CONFIG_UNLINK is not set 4.10 CONFIG_USLEEP=y
5.1 --- a/busybox/stuff/busybox-1.27.config-static Mon Mar 05 13:05:36 2018 +0100 5.2 +++ b/busybox/stuff/busybox-1.27.config-static Mon Mar 05 15:52:59 2018 +0100 5.3 @@ -321,6 +321,7 @@ 5.4 CONFIG_TTY=y 5.5 # CONFIG_UNAME is not set 5.6 CONFIG_UNAME_OSNAME="" 5.7 +# CONFIG_ARCH_ALIAS is not set 5.8 # CONFIG_UNIQ is not set 5.9 # CONFIG_UNLINK is not set 5.10 # CONFIG_USLEEP is not set