mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-25 18:40:19 -04:00
Print failure rate also without rotation rate
This commit is contained in:
parent
1613ca1c86
commit
024b3f80fa
1 changed files with 3 additions and 4 deletions
|
|
@ -739,14 +739,13 @@ static void state_smart(unsigned n, tommy_list* low)
|
|||
if (flag & (SMARTCTL_FLAG_FAIL | SMARTCTL_FLAG_PREFAIL | SMARTCTL_FLAG_PREFAIL_LOGGED))
|
||||
make_it_fail = 1;
|
||||
|
||||
/* note that in older smartmontools, like 5.x, rotation rate is not present */
|
||||
/* and then it could remain unassigned */
|
||||
|
||||
if (flag & (SMARTCTL_FLAG_UNSUPPORTED | SMARTCTL_FLAG_OPEN)) {
|
||||
/* if error running smartctl, skip AFR estimation */
|
||||
afr = 0;
|
||||
printf(" n/a");
|
||||
} else if (devinfo->smart[SMART_ROTATION_RATE] == SMART_UNASSIGNED) {
|
||||
/* if no rotation rate, we don't know if it's SSD or not */
|
||||
afr = 0;
|
||||
printf(" n/k");
|
||||
} else if (devinfo->smart[SMART_ROTATION_RATE] == 0) {
|
||||
/* if SSD, skip AFR estimation as data is from not SSD disks */
|
||||
afr = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue