[git commit master] hush: fix hush -c 'echo $0' - was showing empty string
Denys Vlasenko
vda.linux at googlemail.com
Sat May 22 04:32:11 UTC 2010
commit: http://git.busybox.net/busybox/commit/?id=5ae8f1cdbecd3bdf502992c21a77aae65299c410
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/hush.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/shell/hush.c b/shell/hush.c
index 08e6378..8125a63 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -7093,6 +7093,7 @@ int hush_main(int argc, char **argv)
/* -c 'script' (no params): prevent empty $0 */
G.global_argv--; /* points to argv[i] of 'script' */
G.global_argv[0] = argv[0];
+ G.global_argc++;
} /* else -c 'script' ARG0 [ARG1...]: $0 is ARG0 */
init_sigmasks();
parse_and_run_string(optarg);
--
1.6.3.3
More information about the busybox-cvs
mailing list