mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 06:56:28 -05:00
Return with an error code if the there is a thermal alert that prevent starting
This commit is contained in:
parent
03fb7d3cff
commit
5dfeaf0ef6
5 changed files with 65 additions and 27 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue