Fix return code decode from smartctl on self-test logs
This commit is contained in:
parent
504fbc89f8
commit
3e3f50b501
@ -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 rc [lindex $::errorCode 2]
|
||||||
|
set rc $($rc eq "" ? 1 : [expr {$rc & 7}])
|
||||||
|
if {$rc} {
|
||||||
set msg ""
|
set msg ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set i 0
|
set i 0
|
||||||
|
Loading…
Reference in New Issue
Block a user