On Friday 03 August 2007 17:44, kalyanatejaswi balabhadrapatruni wrote:
> 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.

I am replacing open-coded environ[] scan there with getenv:

+               while ((arg = *++argv) != NULL) {
+                       env = getenv(arg);
+                       if (env)
+                               puts(env);
+               }

Saves ~75 bytes too.

Please test svn, should be fixed now. Thanks.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to