mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 05:40:14 -05:00
Support the case of device not in smartctl database
This commit is contained in:
parent
a02ea3da76
commit
cd1186e434
4 changed files with 4 additions and 17 deletions
|
|
@ -655,13 +655,6 @@ static int devsmart(dev_t device, uint64_t* smart, char* serial)
|
|||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
/* check only first bit, as other bits are used to report other conditions */
|
||||
if ((WEXITSTATUS(ret) & 1) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Failed to run smartctl -a on device '%u:%u' with return code %xh.\n", major(device), minor(device), WEXITSTATUS(ret));
|
||||
return -1;
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* store the return smartctl return value */
|
||||
smart[SMART_FLAGS] = WEXITSTATUS(ret);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue