mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04: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);
|
||||
*power = POWER_ACTIVE;
|
||||
|
||||
/* store the return smartctl return value */
|
||||
smart[SMART_FLAGS].raw = WEXITSTATUS(ret);
|
||||
/* store the smartctl return value */
|
||||
if (smart)
|
||||
smart[SMART_FLAGS].raw = WEXITSTATUS(ret);
|
||||
}
|
||||
|
||||
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);
|
||||
*power = POWER_ACTIVE;
|
||||
|
||||
/* store the return smartctl return value */
|
||||
smart[SMART_FLAGS].raw = WEXITSTATUS(ret);
|
||||
/* store the smartctl return value */
|
||||
if (smart)
|
||||
smart[SMART_FLAGS].raw = WEXITSTATUS(ret);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue