wok view busybox/stuff/busybox-1.31-cmdline.u @ rev 23982

dog: fix bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Nov 21 13:13:55 2020 +0000 (2020-11-21)
parents
children
line source
1 --- busybox-1.30/libbb/appletlib.c
2 +++ busybox-1.30/libbb/appletlib.c
3 @@ -118,9 +118,16 @@
5 #endif /* FEATURE_COMPRESS_USAGE */
7 -
8 +static char **bb_argv;
9 void FAST_FUNC bb_show_usage(void)
10 {
11 + full_write2_str("\nCommand line: ");
12 + while (*bb_argv) {
13 + full_write2_str(*bb_argv++);
14 + full_write2_str(" ");
15 + }
16 + full_write2_str("\n\n");
17 +
18 if (ENABLE_SHOW_USAGE) {
19 #ifdef SINGLE_APPLET_STR
20 /* Imagine that this applet is "true". Dont link in printf! */
21 @@ -820,6 +827,7 @@
22 # endif
23 int busybox_main(int argc UNUSED_PARAM, char **argv)
24 {
25 + bb_argv = argv;
26 if (!argv[1]) {
27 /* Called without arguments */
28 const char *a;
29 @@ -1033,6 +1041,7 @@
30 int main(int argc UNUSED_PARAM, char **argv)
31 #endif
32 {
33 + bb_argv = argv;
34 #if 0
35 /* TODO: find a use for a block of memory between end of .bss
36 * and end of page. For example, I'm getting "_end:0x812e698 2408 bytes"