mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 05:40:14 -05:00
Fix potential crash during thermal spingdown
This commit is contained in:
parent
2f7ac6996c
commit
1e79a19409
2 changed files with 6 additions and 4 deletions
|
|
@ -2818,8 +2818,9 @@ retry:
|
||||||
log_tag("attr:%s:%s:power:active\n", file, name);
|
log_tag("attr:%s:%s:power:active\n", file, name);
|
||||||
*power = POWER_ACTIVE;
|
*power = POWER_ACTIVE;
|
||||||
|
|
||||||
/* store the return smartctl return value */
|
/* store the smartctl return value */
|
||||||
smart[SMART_FLAGS].raw = WEXITSTATUS(ret);
|
if (smart)
|
||||||
|
smart[SMART_FLAGS].raw = WEXITSTATUS(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -1794,8 +1794,9 @@ static int devprobe(dev_t device, const char* name, const char* smartctl, int* p
|
||||||
log_tag("attr:%s:%s:power:active\n", file, name);
|
log_tag("attr:%s:%s:power:active\n", file, name);
|
||||||
*power = POWER_ACTIVE;
|
*power = POWER_ACTIVE;
|
||||||
|
|
||||||
/* store the return smartctl return value */
|
/* store the smartctl return value */
|
||||||
smart[SMART_FLAGS].raw = WEXITSTATUS(ret);
|
if (smart)
|
||||||
|
smart[SMART_FLAGS].raw = WEXITSTATUS(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue