diff --git a/cmdline/device.c b/cmdline/device.c index fc3a733a..8d2289d2 100644 --- a/cmdline/device.c +++ b/cmdline/device.c @@ -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;