Exit code and logging invariants for log_fatal and hardware log_error
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run

This commit is contained in:
Andrea Mazzoleni 2026-09-20 15:56:14 +02:00
parent c2d46f4039
commit 51b5020b8e
14 changed files with 120 additions and 24 deletions

View file

@ -3230,6 +3230,11 @@ int state_check(struct snapraid_state* state, int fix, block_off_t blockstart, b
if (process_error != 0)
return -1;
if (log_hardware_errors() != 0) {
msg_status("Everything done, but hardware errors were encountered in the process\n");
return -1;
}
msg_status("Everything OK\n");
return 0;