refactor: reorder smartctl command fallback chain to prioritize -d sat mode before standard commands
Move -d sat variants of -A and -x commands to front of fallback chain before non-sat equivalents in smart_temperature() function to improve compatibility with SATA drives behind USB/RAID controllers
This commit is contained in:
@@ -371,10 +371,10 @@ def smart_temperature(device):
|
||||
return None
|
||||
|
||||
for command in (
|
||||
["smartctl", "-A", smart_device],
|
||||
["smartctl", "-A", "-d", "sat", smart_device],
|
||||
["smartctl", "-x", smart_device],
|
||||
["smartctl", "-x", "-d", "sat", smart_device],
|
||||
["smartctl", "-A", smart_device],
|
||||
["smartctl", "-x", smart_device],
|
||||
):
|
||||
output, _ = _read_command(command, timeout=6, warn_on_nonzero=False)
|
||||
temperature = extract(output)
|
||||
|
||||
Reference in New Issue
Block a user