mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-22 07:56:33 -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
|
|
@ -223,8 +223,12 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
|
|||
io_start(&io, blockstart, blockmax, 0);
|
||||
|
||||
blockcur = blockstart;
|
||||
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;
|
||||
|
||||
while (1) {
|
||||
void** buffer;
|
||||
|
|
@ -439,6 +443,10 @@ bail:
|
|||
|
||||
if (soft_error + io_error != 0)
|
||||
return -1;
|
||||
|
||||
if (alert < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue