Fix return code decode from smartctl on self-test logs

This commit is contained in:
prpr 2023-11-20 16:04:03 +00:00
parent 504fbc89f8
commit 3e3f50b501

View File

@ -191,8 +191,12 @@ puts {
</tr> </tr>
} }
if {[catch {set msg [exec /bin/smartctl -l selftest $device]}]} { if {[catch {exec /bin/smartctl -l selftest $device} msg]} {
set msg "" set rc [lindex $::errorCode 2]
set rc $($rc eq "" ? 1 : [expr {$rc & 7}])
if {$rc} {
set msg ""
}
} }
set i 0 set i 0