Hi all,
"printenv" command prints argv[1] and exits, doesnt
run through rest of the elements of argv[].
---------------
Example:
#busybox printenv SHELL PWD
/bin/sh
#
Doesnt print PWD
----------------
No great deal, small patch attached.
regards
kalyan
Unlimited freedom, unlimited storage. Get it now, on
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/diff -Naur busybox-1.6.1-orig/coreutils/printenv.c
busybox-1.6.1/coreutils/printenv.c
--- busybox-1.6.1-orig/coreutils/printenv.c 2007-08-03 21:36:36.257344792
+0530
+++ busybox-1.6.1/coreutils/printenv.c 2007-08-03 21:37:05.616881464 +0530
@@ -28,7 +28,7 @@
char *arg, *env;
for (i=1; (arg = argv[i]); ++i)
- for (; (env = environ[e]); ++e) {
+ for (e=0; (env = environ[e]); ++e) {
l = strlen(arg);
if (!strncmp(env, arg, l) && env[l] == '=')
puts(env + l + 1);_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox