From 44ecc534ba4c0576884c7d4bbbfa9e8cf15369f6 Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Fri, 18 Aug 2000 00:28:00 +0000 Subject: [PATCH] Two small sensors-detect errors fixed: * LM80 detect was broken, because it tried to access register $0x02 (instead of 0x02); this resulted in a runtime warning. * At one place, another perl warning is fixed now. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@859 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 133e7fc3..56794e4f 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -756,7 +756,7 @@ sub adapter_pci_detection } } } - if (! defined @res) { + if (! @res) { print ("Sorry, no PCI bus adapters found.\n"); } else { printf ("Probe succesfully concluded.\n"); @@ -1456,7 +1456,7 @@ sub lm80_detect { my $i; my ($file,$addr) = @_; - return if (i2c_smbus_read_byte_data($file,$0x02) & 0xc0) != 0; + return if (i2c_smbus_read_byte_data($file,0x02) & 0xc0) != 0; for ($i = 0x2a; $i <= 0x3d; $i++) { my $reg = i2c_smbus_read_byte_data($file,$i); return if i2c_smbus_read_byte_data($file,$i+0x40) != $reg;