Commit 163fcffa authored by chrfranke's avatar chrfranke
Browse files

smartd '-l selftest' directive: Print info if error count decreased.

Avoid misleading warning if error count decreased to zero (ticket #67).

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@3082 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 013021ea
......@@ -43,6 +43,10 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] smartd '-l selftest' directive: Print info if error count
decreased. Avoid misleading warning if error count decreased
to zero (ticket #67).
[CF] smartctl: Rework ataPrintMain(). Issue ATA SMART commands only if
necessary. Improve handling of SMART STATUS command failure when
ATA output registers are missing (ticket #27).
......
......@@ -2058,7 +2058,8 @@ static void CheckSelfTestLogs(const dev_config & cfg, dev_state & state, int new
MailWarning(cfg, state, 3, "Device: %s, Self-Test Log error count increased from %d to %d",
name, oldc, newc);
state.must_write = true;
} else if (oldh!=newh) {
}
else if (newc > 0 && oldh != newh) {
// more recent error
// a 'more recent' error might actually be a smaller hour number,
// if the hour number has wrapped.
......@@ -2072,7 +2073,12 @@ static void CheckSelfTestLogs(const dev_config & cfg, dev_state & state, int new
name, newh);
state.must_write = true;
}
// Print info if error entries have disappeared
if (oldc > newc)
PrintOut(LOG_INFO, "Device: %s, Self-Test Log error count decreased from %d to %d\n",
name, oldc, newc);
// Needed since self-test error count may DECREASE. Hour might
// also have changed.
state.selflogcount= newc;
......
Markdown is supported
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