mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
cruft cleanup
This commit is contained in:
parent
129396f187
commit
bebf52ef94
8
inxi
8
inxi
|
@ -8251,7 +8251,7 @@ get_sensors_data()
|
|||
# for temp1/2 only use temp1/2 if they are null or greater than the last ones
|
||||
$1 ~ /^temp1$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
|
||||
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
|
||||
if ( temp1 == "" || tempWorking > 0 ) {
|
||||
if ( temp1 == "" || ( tempWorking != "" && tempWorking > 0 ) ) {
|
||||
temp1=tempWorking
|
||||
}
|
||||
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
||||
|
@ -8261,7 +8261,7 @@ get_sensors_data()
|
|||
}
|
||||
$1 ~ /^temp2$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
|
||||
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
|
||||
if ( temp2 == "" || tempWorking > 0 ) {
|
||||
if ( temp2 == "" || ( tempWorking != "" && tempWorking > 0 ) ) {
|
||||
temp2=tempWorking
|
||||
}
|
||||
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
||||
|
@ -8272,7 +8272,7 @@ get_sensors_data()
|
|||
# temp3 is only used as an absolute override for systems with all 3 present
|
||||
$1 ~ /^temp3$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
|
||||
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
|
||||
if ( temp3 == "" || tempWorking > 0 ) {
|
||||
if ( temp3 == "" || ( tempWorking != "" && tempWorking > 0 ) ) {
|
||||
temp3=tempWorking
|
||||
}
|
||||
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
||||
|
@ -8284,7 +8284,7 @@ get_sensors_data()
|
|||
# temp on wrapped second line, not handled
|
||||
/^(core0|core 0|Physical id 0)(.*)\+([0-9]+)(.*)[ \t°](C|F)/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
|
||||
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
|
||||
if ( core0Temp == "" || tempWorking > 0 ) {
|
||||
if ( tempWorking != "" && core0Temp == "" && tempWorking > 0 ) {
|
||||
core0Temp=tempWorking
|
||||
}
|
||||
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
||||
|
|
Loading…
Reference in a new issue