[Toybox] [PATCH] ls.c: match coreutils exit status.

enh enh at google.com
Thu Oct 31 09:50:07 PDT 2019


Andrew Ilijic noticed that our ls exit status differs from coreutils
while writing tests. From coreutils' `ls --help`:

 0  if OK,
 1  if minor problems (e.g., cannot access subdirectory),
 2  if serious trouble (e.g., cannot access command-line argument).

Invalid/unknown command-line arguments count as 2.
---
 tests/ls.test   | 13 +++++++++++--
 toys/posix/ls.c |  8 +++++---
 2 files changed, 16 insertions(+), 5 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ls.c-match-coreutils-exit-status.patch
Type: text/x-patch
Size: 3240 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20191031/38629b55/attachment-0002.bin>


More information about the Toybox mailing list