Commit c0246520 authored by chrfranke's avatar chrfranke
Browse files

ataprint.cpp: Print error count even if error log index is invalid.


git-svn-id: https://svn.code.sf.net/p/smartmontools/code/trunk@5407 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 78878b07
$Id$
2022-08-15 Christian Franke <franke@computer.org>
ataprint.cpp: Print error count even if error log index is invalid.
2022-08-07 Christian Franke <franke@computer.org>
drivedb.h:
......
......@@ -2194,9 +2194,9 @@ static int PrintSmartErrorlog(const ata_smart_errorlog *data,
print_on();
// If log pointer out of range, return
if (data->error_log_pointer>5){
pout("Invalid Error Log index = 0x%02x (T13/1321D rev 1c "
"Section 8.41.6.8.2.2 gives valid range from 1 to 5)\n\n",
(int)data->error_log_pointer);
pout("Invalid Error Log index = 0x%02x (valid range is from 1 to 5)\n",
data->error_log_pointer);
pout("ATA Error Count: %d (possibly also invalid)\n\n", data->ata_error_count);
return 0;
}
......@@ -2359,6 +2359,7 @@ static int PrintSmartExtErrorLog(ata_device * device,
// to 0.
if (!(erridx == 0 && 1 <= log->reserved1 && log->reserved1 <= nentries)) {
pout("Invalid Error Log index = 0x%04x (reserved = 0x%02x)\n", erridx, log->reserved1);
pout("Device Error Count: %d (possibly also invalid)\n\n", log->device_error_count);
return 0;
}
pout("Invalid Error Log index = 0x%04x, trying reserved byte (0x%02x) instead\n", erridx, log->reserved1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment