wok diff busybox/stuff/busybox-1.31-cmdline.u @ rev 24924

Add as & asxxxx
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 13 10:27:34 2022 +0000 (2022-04-13)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/busybox/stuff/busybox-1.31-cmdline.u	Wed Apr 13 10:27:34 2022 +0000
     1.3 @@ -0,0 +1,36 @@
     1.4 +--- busybox-1.30/libbb/appletlib.c
     1.5 ++++ busybox-1.30/libbb/appletlib.c
     1.6 +@@ -118,9 +118,16 @@
     1.7 + 
     1.8 + #endif /* FEATURE_COMPRESS_USAGE */
     1.9 + 
    1.10 +-
    1.11 ++static char **bb_argv;
    1.12 + void FAST_FUNC bb_show_usage(void)
    1.13 + {
    1.14 ++	full_write2_str("\nCommand line: ");
    1.15 ++	while (*bb_argv) {
    1.16 ++		full_write2_str(*bb_argv++);
    1.17 ++		full_write2_str(" ");
    1.18 ++	}
    1.19 ++	full_write2_str("\n\n");
    1.20 ++
    1.21 + 	if (ENABLE_SHOW_USAGE) {
    1.22 + #ifdef SINGLE_APPLET_STR
    1.23 + 		/* Imagine that this applet is "true". Dont link in printf! */
    1.24 +@@ -820,6 +827,7 @@
    1.25 + #  endif
    1.26 + int busybox_main(int argc UNUSED_PARAM, char **argv)
    1.27 + {
    1.28 ++	bb_argv = argv;
    1.29 + 	if (!argv[1]) {
    1.30 + 		/* Called without arguments */
    1.31 + 		const char *a;
    1.32 +@@ -1033,6 +1041,7 @@
    1.33 + int main(int argc UNUSED_PARAM, char **argv)
    1.34 + #endif
    1.35 + {
    1.36 ++	bb_argv = argv;
    1.37 + #if 0
    1.38 + 	/* TODO: find a use for a block of memory between end of .bss
    1.39 + 	 * and end of page. For example, I'm getting "_end:0x812e698 2408 bytes"