freebsd-dev/sbin/fsck_ffs
Kirk McKusick 2983ec0a87 Ensure that fsck(8) / fsck_ffs(8) produces the correct exit code
for missing devices.

The fsck_ffs(8) utility uses its internal function openfilesys()
when opening a disk to be checked. This change avoids the use
of pfatal() in openfilesys() which always exits with failure (exit
value 8) so that the caller can choose the correct exit value.
In the case of a non-existent device it should exit with value 3
which allows the startup system to wait for drives (such as those
attached by USB) to come online.

Reported by: karels
Tested by:   karels
PR:          262580
MFC after:   3 days
2022-03-16 11:37:15 -07:00
..
dir.c Eliminate an unnecessary rerun request in fsck_ffs. 2021-09-22 16:20:19 -07:00
ea.c [skip ci] correct a few SPDX license tags 2021-07-07 13:52:20 -06:00
fsck_ffs.8 Correct the location of the first backup superblock in fsck_ffs.8. 2019-08-07 16:56:00 +00:00
fsck.h Update fsdb(8) to reflect new structure of fsck_ffs(8). 2022-02-23 15:40:58 -08:00
fsutil.c Have fsck_ffs(8) properly correct superblock check-hash failures. 2022-02-04 11:47:48 -08:00
gjournal.c Rewrite the disk I/O management system in fsck_ffs(8). Other than 2021-01-07 15:03:15 -08:00
globs.c Have fsck_ffs(8) properly correct superblock check-hash failures. 2022-02-04 11:47:48 -08:00
inode.c Avoid lost buffers in fsck_ffs. 2021-10-07 15:52:58 -07:00
main.c Update fsdb(8) to reflect new structure of fsck_ffs(8). 2022-02-23 15:40:58 -08:00
Makefile sbin: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:33:01 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pass1.c Ensure that files with no allocated blocks are trimmed to zero length. 2021-05-11 14:52:26 -07:00
pass1b.c Fix fsck_ffs Pass 1b error exit "bad inode number 256 to nextinode". 2021-05-19 14:39:24 -07:00
pass2.c Rewrite the disk I/O management system in fsck_ffs(8). Other than 2021-01-07 15:03:15 -08:00
pass3.c Rewrite the disk I/O management system in fsck_ffs(8). Other than 2021-01-07 15:03:15 -08:00
pass4.c Rewrite the disk I/O management system in fsck_ffs(8). Other than 2021-01-07 15:03:15 -08:00
pass5.c Use proper type (ino_t) for inode numbers to avoid improper sign extention 2020-10-25 21:04:07 +00:00
setup.c Ensure that fsck(8) / fsck_ffs(8) produces the correct exit code 2022-03-16 11:37:15 -07:00
suj.c Remove #define _KERNEL hacks from libprocstat 2021-02-21 11:38:21 +02:00
utilities.c Remove unused includes. 2019-12-22 05:44:29 +00:00