snapshot-20080618 'ls' inverted return status

Bernhard Fischer rep.dot.nop at gmail.com
Wed Jun 18 11:01:49 PDT 2008


On Wed, Jun 18, 2008 at 06:38:50PM +0200, Denys Vlasenko wrote:
>On Wednesday 18 June 2008 15:15, George Boudreau wrote:
>> Hi,
>>   While building busybox-20080618, with defconfig, I stumbled upon a
>> problem with 'ls'.
>> 
>> ./busybox ls; echo $?
>> 1
>> ./busybox ls qwert; echo $?
>> 0
>> 
>> Looks like the status logic is inverted.
>> 
>>     if (ENABLE_FEATURE_CLEAN_UP)
>>         dfree(dnp, nfiles);
>>     return (exit_failure == 0);
>> 
>> should be
>> 
>>     return (exit_failure == 1);
>> or
>>     return (exit_failure);
>
>Thanks for catching this.
>I renamed the variable to exit_code now, and fixed the logic.

George, mind to provide (some?) testsuite checks for these exit-codes?


More information about the busybox mailing list