diff options
author | Ondřej Vašík <ovasik@redhat.com> | 2008-10-09 10:56:54 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-10-13 09:01:54 +0200 |
commit | 7377f49ea807562816ba027030b3ec90958d0819 (patch) | |
tree | ec28b099957069063c1f7473508648f3ebc35599 /src | |
parent | 969841cb77fe2fc95959eb740809547b29381bd8 (diff) | |
download | coreutils-7377f49ea807562816ba027030b3ec90958d0819.tar.xz |
doc: ls: clarify exit status description
* src/ls.c (exit_status): Clarify comments.
(usage): Clarify exit status description in --help output.
* doc/coreutils.texi (ls invocation): Clarify exit status documentation
Reported by Greg Metcalfe in <http://bugzilla.redhat.com/446294>.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -715,11 +715,14 @@ static int exit_status; /* Exit statuses. */ enum { - /* "ls" had a minor problem (e.g., it could not stat a directory - entry). */ + /* "ls" had a minor problem. E.g., while processing a directory, + ls obtained the name of an entry via readdir, yet was later + unable to stat that name. This happens when listing a directory + in which entries are actively being removed or renamed. */ LS_MINOR_PROBLEM = 1, - /* "ls" had more serious trouble. */ + /* "ls" had more serious trouble (e.g., memory exhausted, invalid + option or failure to stat a command line argument. */ LS_FAILURE = 2 }; @@ -4527,7 +4530,12 @@ colors, and can be set easily by the dircolors command.\n\ "), stdout); fputs (_("\ \n\ -Exit status is 0 if OK, 1 if minor problems, 2 if serious trouble.\n\ +Exit status:\n\ +0 if OK,\n\ +1 if minor problems (e.g., failure to access a file or directory not\n\ + specified as a command line argument\n\ +2 if serious trouble (e.g., memory exhausted, invalid option or failure\n\ + to access a file or directory specified as a command line argument).\n\ "), stdout); emit_bug_reporting_address (); } |