Skip to content

Commit

Permalink
In ATA mode smartctl could print "[No Information Found]" for "Device…
Browse files Browse the repository at this point in the history
… Model". Make it "NA" instead
  • Loading branch information
slowpeek committed Jun 1, 2024
1 parent 131346d commit ef73f5e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hddtemp-lt
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ main() {
'Device Model:'*)
read -r _ _ name <<< "$line"
parser=ata

if [[ $name == '[No Information Found]' ]]; then
# Set non-empty name=NA (the same placeholder is
# used below in the $items array) to explicitly
# indicate the model data is not available, but
# parsing for the temp should still proceed.
name=NA
fi

break ;;
'Model Number:'*)
read -r _ _ name <<< "$line"
Expand Down

0 comments on commit ef73f5e

Please sign in to comment.