You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exit code returned by fsck is the sum of the following conditions:
0 No errors
1 Filesystem errors corrected
2 System should be rebooted
4 Filesystem errors left uncorrected
8 Operational error
16 Usage or syntax error
32 Checking canceled by user request
128 Shared-library error
The way this is implemented in /sbin/fsck is by performing bitwise OR on exit codes of the filesystem-specific fsck subprocesses it spawns; this relies on them in turn implementing the same convention in their exit codes.
fsck.fat does not conform to this standard: for example, invalid command lines result in exit code 2. Quitting at an interactive prompt results in exit code 0. The program chooses between exit codes 0 and 1 based on whether the changes were written to the file system image, not based on whether errors were detected.
Software which relies on these exit codes being used properly may perform erroneously. Apart from /sbin/fsck, this includes systemd-fsck and probably other software.
(Discovered while investigating issue #88; also subsumes #48.)
The text was updated successfully, but these errors were encountered:
Excerpt from
fsck(8)
:The way this is implemented in
/sbin/fsck
is by performing bitwise OR on exit codes of the filesystem-specific fsck subprocesses it spawns; this relies on them in turn implementing the same convention in their exit codes.fsck.fat
does not conform to this standard: for example, invalid command lines result in exit code 2. Quitting at an interactive prompt results in exit code 0. The program chooses between exit codes 0 and 1 based on whether the changes were written to the file system image, not based on whether errors were detected.Software which relies on these exit codes being used properly may perform erroneously. Apart from
/sbin/fsck
, this includessystemd-fsck
and probably other software.(Discovered while investigating issue #88; also subsumes #48.)
The text was updated successfully, but these errors were encountered: