freebsd-dev/bin/ls
Bryan Drewery 2dfa4b66b3 fts_read: Handle error from a NULL return better.
This is addressing cases such as fts_read(3) encountering an [EIO]
from fchdir(2) when FTS_NOCHDIR is not set.  That would otherwise be
seen as a successful traversal in some of these cases while silently
discarding expected work.

As noted in r264201, fts_read() does not set errno to 0 on a successful
EOF so it needs to be set before calling it.  Otherwise we might see
a random error from one of the iterations.

gzip is ignoring most errors and could be improved separately.

Reviewed by:	vangyzen
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D27184
2020-12-08 23:38:26 +00:00
..
tests Fix ls_tests:o_flag with ZFS TMPDIR 2016-12-15 16:13:52 +00:00
cmp.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
extern.h ls(1): Add --color=when 2018-08-17 04:15:51 +00:00
ls.1 ls(1): Use \& as an escape character for the ',' option 2020-10-10 13:39:13 +00:00
ls.c fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
ls.h Convert ls(1) to not use libxo(3) 2018-01-17 22:47:34 +00:00
Makefile Now that we have MK_LS_COLORS, we don't need RELEASE_CRUNCH check here. 2019-07-15 07:35:46 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
print.c ls(1): Add --color=when 2018-08-17 04:15:51 +00:00
util.c ls(1): Add --color=when 2018-08-17 04:15:51 +00:00