wok annotate busybox/stuff/busybox-1.18-cmdline.u @ rev 9844
firefox-dev: Added libxul.pc into stuff folder. This will allow us to compile gecko-mediaplayer again.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun May 15 17:05:20 2011 +0000 (2011-05-15) |
parents | |
children |
rev | line source |
---|---|
pascal@8238 | 1 Display command line in usage output. Useful to debug scripts with variables. |
pascal@8238 | 2 --- busybox-1.18.1/libbb/appletlib.c |
pascal@8238 | 3 +++ busybox-1.18.1/libbb/appletlib.c |
pascal@8238 | 4 @@ -97,9 +97,16 @@ |
pascal@8238 | 5 |
pascal@8238 | 6 #endif /* FEATURE_COMPRESS_USAGE */ |
pascal@8238 | 7 |
pascal@8238 | 8 - |
pascal@8238 | 9 +static char **bb_argv; |
pascal@8238 | 10 void FAST_FUNC bb_show_usage(void) |
pascal@8238 | 11 { |
pascal@8238 | 12 + full_write2_str("\nCommand line: "); |
pascal@8238 | 13 + while (*bb_argv) { |
pascal@8238 | 14 + full_write2_str(*bb_argv++); |
pascal@8238 | 15 + full_write2_str(" "); |
pascal@8238 | 16 + } |
pascal@8238 | 17 + full_write2_str("\n\n"); |
pascal@8238 | 18 + |
pascal@8238 | 19 if (ENABLE_SHOW_USAGE) { |
pascal@8238 | 20 #ifdef SINGLE_APPLET_STR |
pascal@8238 | 21 /* Imagine that this applet is "true". Dont suck in printf! */ |
pascal@8238 | 22 @@ -635,6 +642,7 @@ |
pascal@8238 | 23 /* If we were called as "busybox..." */ |
pascal@8238 | 24 static int busybox_main(char **argv) |
pascal@8238 | 25 { |
pascal@8238 | 26 + bb_argv = argv; |
pascal@8238 | 27 if (!argv[1]) { |
pascal@8238 | 28 /* Called without arguments */ |
pascal@8238 | 29 const char *a; |
pascal@8238 | 30 @@ -785,6 +793,7 @@ |
pascal@8238 | 31 int main(int argc UNUSED_PARAM, char **argv) |
pascal@8238 | 32 #endif |
pascal@8238 | 33 { |
pascal@8238 | 34 + bb_argv = argv; |
pascal@8238 | 35 /* Tweak malloc for reduced memory consumption */ |
pascal@8238 | 36 #ifndef PAGE_SIZE |
pascal@8238 | 37 # define PAGE_SIZE (4*1024) /* guess */ |