[PATCH] hush.c - export -n flag support
Bayram Kurumahmut
bayram.kurumahmut at gmail.com
Mon Apr 20 19:49:51 UTC 2009
When I changed only export bit; it didn't work:
/media/disk-1/busybox-trunk $ set | grep A=1
/media/disk-1/busybox-trunk $ set | grep A=
/media/disk-1/busybox-trunk $ A=1
/media/disk-1/busybox-trunk $ set | grep A=
A=1
/media/disk-1/busybox-trunk $ export -n A
/media/disk-1/busybox-trunk $ set | grep A=
A=1
/media/disk-1/busybox-trunk $ export A
/media/disk-1/busybox-trunk $ env | grep A=
A=1
/media/disk-1/busybox-trunk $ export -n A
/media/disk-1/busybox-trunk $ set | grep A=
A=1
/media/disk-1/busybox-trunk $ env | grep A=
A=1 <= We shouldn't see this???
Test results seem to be OK?
Regards,
Bayram
On Mon, Apr 20, 2009 at 10:26 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Monday 20 April 2009 15:11:59 Bayram Kurumahmut wrote:
> > I forgot to add message body to my previous mail. It follows:
> >
> > Added two new files: shell/hush_test/export-n.tests and
> > shell/hush_test/export-n.right
> > Added set then export -n test and test cases from my first mail
> > Config.in help text changed
>
> still using "#ifdef" rather than "#if" though ...
>
> + if (flag_n) {
> + if (getenv(name))
> + unsetenv(name);
> + continue;
> + } else
>
> shouldnt this be modifying the export bit rather than unsetting the var ?
>
> var = get_local_var(name);
> if (var)
> var->flg_export = 0;
> continue;
> -mike
>
--
Bayram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090420/1b657e33/attachment.htm>
More information about the busybox
mailing list