[PATCH] hush.c - export -n flag support

Bayram Kurumahmut bayram.kurumahmut at gmail.com
Mon Apr 20 08:35:46 UTC 2009


I think I am wrong, looking at it.

Regards,
Bayram

On Mon, Apr 20, 2009 at 9:28 AM, Bayram Kurumahmut <
bayram.kurumahmut at gmail.com> wrote:

>
>
> On Mon, Apr 20, 2009 at 8:46 AM, Mike Frysinger <vapier at gentoo.org> wrote:
>
>> On Sunday 19 April 2009 15:12:55 Bayram Kurumahmut wrote:
>> > Add support for export '-n' flag
>>
>> not in POSIX, thus it should have a config option and be disabled by
>> default:
>>
>> http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#export
>>
>>
>
> You are right, thanks for the link.
>
>
>>
>> > Tested as the followings
>>
>> so please create a test case in the hush test subdir
>>
>
> Sure.
>
>
>>
>> > # export -n A=1
>>
>> i'm pretty sure your implementation handles this incorrectly.  this:
>> unset A; export -n A=1
>> should result in A being set to "1".  yours does not do this from what i
>> can
>> see.
>
>
> Did you mean 'unset A; export A=1' ? Because I expected A to be removed
> with '-n' option.
>
> by fixing that, you should be able to combine the ugly memory management
>> your change addes with the existing xstrdup() in the code.
>>
>> you've also got whitespace damage and useless comments (pretty much every
>> one
>> i saw was unnecessary).
>> -mike
>>
>> _______________________________________________
>> busybox mailing list
>> busybox at busybox.net
>> http://lists.busybox.net/mailman/listinfo/busybox
>>
>
>
>
> --
> Bayram
>



-- 
Bayram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090420/f6fbd212/attachment.htm>


More information about the busybox mailing list