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

@ -966,8 +966,12 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna
/* check all the blocks in files */
countsize = 0;
countpos = 0;
if (!state_progress_begin(state, blockstart, blockmax, countmax))
int alert = state_progress_begin(state, blockstart, blockmax, countmax);
if (alert > 0)
goto end;
if (alert < 0)
goto bail;
for (i = blockstart; i < blockmax; ++i) {
unsigned failed_count;
@ -2086,6 +2090,9 @@ bail:
}
}
if (alert < 0)
return -1;
return 0;
}