snapshot-20080618 'ls' inverted return status
Denys Vlasenko
vda.linux at googlemail.com
Wed Jun 18 16:38:50 UTC 2008
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.
--
vda
More information about the busybox
mailing list