wok diff busybox/stuff/busybox-1.18.2-cmdline.u @ rev 8159

Updated busybox for tazwok-experimental.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Jan 26 18:02:11 2011 +0000 (2011-01-26)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/busybox/stuff/busybox-1.18.2-cmdline.u	Wed Jan 26 18:02:11 2011 +0000
     1.3 @@ -0,0 +1,37 @@
     1.4 +Display command line in usage output. Useful to debug scripts with variables.
     1.5 +--- busybox-1.18.1/libbb/appletlib.c
     1.6 ++++ busybox-1.18.1/libbb/appletlib.c
     1.7 +@@ -97,9 +97,16 @@
     1.8 + 
     1.9 + #endif /* FEATURE_COMPRESS_USAGE */
    1.10 + 
    1.11 +-
    1.12 ++static char **bb_argv;
    1.13 + void FAST_FUNC bb_show_usage(void)
    1.14 + {
    1.15 ++	full_write2_str("\nCommand line: ");
    1.16 ++	while (*bb_argv) {
    1.17 ++		full_write2_str(*bb_argv++);
    1.18 ++		full_write2_str(" ");
    1.19 ++	}
    1.20 ++	full_write2_str("\n\n");
    1.21 ++
    1.22 + 	if (ENABLE_SHOW_USAGE) {
    1.23 + #ifdef SINGLE_APPLET_STR
    1.24 + 		/* Imagine that this applet is "true". Dont suck in printf! */
    1.25 +@@ -635,6 +642,7 @@
    1.26 + /* If we were called as "busybox..." */
    1.27 + static int busybox_main(char **argv)
    1.28 + {
    1.29 ++	bb_argv = argv;
    1.30 + 	if (!argv[1]) {
    1.31 + 		/* Called without arguments */
    1.32 + 		const char *a;
    1.33 +@@ -785,6 +793,7 @@
    1.34 + int main(int argc UNUSED_PARAM, char **argv)
    1.35 + #endif
    1.36 + {
    1.37 ++	bb_argv = argv;
    1.38 + 	/* Tweak malloc for reduced memory consumption */
    1.39 + #ifndef PAGE_SIZE
    1.40 + # define PAGE_SIZE (4*1024) /* guess */