wok-current annotate busybox/stuff/busybox-1.17.4-cmdline.u @ rev 7728
Add glib-dev to ORBit2-dev depends.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Dec 19 19:37:20 2010 +0000 (2010-12-19) |
parents | |
children |
rev | line source |
---|---|
pascal@7439 | 1 Display command line in usage output. Useful to debug scripts. |
pascal@7439 | 2 --- busybox-1.17.4/libbb/appletlib.c |
pascal@7439 | 3 +++ busybox-1.17.4/libbb/appletlib.c |
pascal@7439 | 4 @@ -97,9 +97,16 @@ |
pascal@7439 | 5 |
pascal@7439 | 6 #endif /* FEATURE_COMPRESS_USAGE */ |
pascal@7439 | 7 |
pascal@7439 | 8 - |
pascal@7439 | 9 +static char **bb_argv; |
pascal@7439 | 10 void FAST_FUNC bb_show_usage(void) |
pascal@7439 | 11 { |
pascal@7439 | 12 + full_write2_str("\nCommand line: "); |
pascal@7439 | 13 + while (*bb_argv) { |
pascal@7439 | 14 + full_write2_str(*bb_argv++); |
pascal@7439 | 15 + full_write2_str(" "); |
pascal@7439 | 16 + } |
pascal@7439 | 17 + full_write2_str("\n\n"); |
pascal@7439 | 18 + |
pascal@7439 | 19 if (ENABLE_SHOW_USAGE) { |
pascal@7439 | 20 #ifdef SINGLE_APPLET_STR |
pascal@7439 | 21 /* Imagine that this applet is "true". Dont suck in printf! */ |
pascal@7439 | 22 @@ -634,6 +641,7 @@ |
pascal@7439 | 23 /* If we were called as "busybox..." */ |
pascal@7439 | 24 static int busybox_main(char **argv) |
pascal@7439 | 25 { |
pascal@7439 | 26 + bb_argv = argv; |
pascal@7439 | 27 if (!argv[1]) { |
pascal@7439 | 28 /* Called without arguments */ |
pascal@7439 | 29 const char *a; |
pascal@7439 | 30 @@ -783,6 +791,7 @@ |
pascal@7439 | 31 int main(int argc UNUSED_PARAM, char **argv) |
pascal@7439 | 32 #endif |
pascal@7439 | 33 { |
pascal@7439 | 34 + bb_argv = argv; |
pascal@7439 | 35 /* Tweak malloc for reduced memory consumption */ |
pascal@7439 | 36 #ifndef PAGE_SIZE |
pascal@7439 | 37 # define PAGE_SIZE (4*1024) /* guess */ |