Return with an error code if the there is a thermal alert that prevent starting
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-win (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-02-09 23:49:02 +01:00
parent 03fb7d3cff
commit 5dfeaf0ef6
5 changed files with 65 additions and 27 deletions

View file

@ -4576,7 +4576,7 @@ int state_progress_begin(struct snapraid_state* state, block_off_t blockstart, b
/* start of thermal control */
if (!state_thermal_begin(state, now))
return 0;
return -1;
/* stop if requested */
if (global_interrupt) {
@ -4586,11 +4586,11 @@ int state_progress_begin(struct snapraid_state* state, block_off_t blockstart, b
}
log_tag("sigint:0: SIGINT received\n");
log_flush();
return 0;
return 1;
/* LCOV_EXCL_STOP */
}
return 1;
return 0;
}
void state_progress_end(struct snapraid_state* state, block_off_t countpos, block_off_t countmax, data_off_t countsize, const char* msg)