wok annotate busybox/stuff/busybox-1.27-cmdline.u @ rev 21205

Add lbzip2 (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 07 20:34:36 2019 +0200 (2019-04-07)
parents
children
rev   line source
pascal@19991 1 Display command line in usage output. Useful to debug scripts with variables.
pascal@19991 2 --- busybox-1.27/libbb/appletlib.c
pascal@19991 3 +++ busybox-1.27/libbb/appletlib.c
pascal@19991 4 @@ -129,9 +129,16 @@
pascal@19991 5
pascal@19991 6 #endif /* FEATURE_COMPRESS_USAGE */
pascal@19991 7
pascal@19991 8 -
pascal@19991 9 +static char **bb_argv;
pascal@19991 10 void FAST_FUNC bb_show_usage(void)
pascal@19991 11 {
pascal@19991 12 + full_write2_str("\nCommand line: ");
pascal@19991 13 + while (*bb_argv) {
pascal@19991 14 + full_write2_str(*bb_argv++);
pascal@19991 15 + full_write2_str(" ");
pascal@19991 16 + }
pascal@19991 17 + full_write2_str("\n\n");
pascal@19991 18 +
pascal@19991 19 if (ENABLE_SHOW_USAGE) {
pascal@19991 20 #ifdef SINGLE_APPLET_STR
pascal@19991 21 /* Imagine that this applet is "true". Dont suck in printf! */
pascal@19991 22 @@ -753,6 +760,7 @@
pascal@19991 23 /* If we were called as "busybox..." */
pascal@19991 24 static int busybox_main(char **argv)
pascal@19991 25 {
pascal@19991 26 + bb_argv = argv;
pascal@19991 27 if (!argv[1]) {
pascal@19991 28 /* Called without arguments */
pascal@19991 29 const char *a;
pascal@19991 30 @@ -952,6 +960,7 @@
pascal@19991 31 int main(int argc UNUSED_PARAM, char **argv)
pascal@19991 32 #endif
pascal@19991 33 {
pascal@19991 34 + bb_argv = argv;
pascal@19991 35 #if 0
pascal@19991 36 /* TODO: find a use for a block of memory between end of .bss
pascal@19991 37 * and end of page. For example, I'm getting "_end:0x812e698 2408 bytes"