From c34175d0a22772cd320bb769063164df151205d2 Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Sat, 13 Nov 1999 22:57:17 +0000 Subject: [PATCH] Changed sensors-detect to understand i2c-isa.o and other dummy adapters. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@627 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 24487c1e..5d161817 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -629,6 +629,7 @@ $IOCTL_I2C_TENBIT = 0x0704; $IOCTL_I2C_SMBUS = 0x0720; + use vars qw($SMBUS_READ $SMBUS_WRITE $SMBUS_QUICK $SMBUS_BYTE $SMBUS_BYTE_DATA $SMBUS_WORD_DATA $SMBUS_PROC_CALL $SMBUS_BLOCK_DATA); @@ -1837,8 +1838,9 @@ sub main my ($inp,@not_to_scan,$inp2); open INPUTFILE,"/proc/bus/i2c" or die "Couldn't open /proc/bus/i2c?!?"; while () { + my ($dev_nr,$type,$adap,$algo) = /^i2c-(\S+)\s+(\S+)\s+(.*?)\s*\t\s*(.*?)\s+$/; + next if ($type eq "dummy"); print "\n"; - my ($dev_nr,$adap,$algo) = /^i2c-(\S+)\s+\S+\s+(.*?)\s*\t\s*(.*?)\s+$/; print "Next adapter: $adap ($algo)\n"; print "Do you want to scan it? (YES/no/selectively): ";