From 222efa20ac7f1ec5133e4063aa8a89bf8f658386 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 21 Sep 2006 18:55:43 +0000 Subject: [PATCH] Do not assume that every i2c chip at 0x50 is handled by the eeprom driver. Some are handled by the tveeprom driver, which doesn't create the eeprom interface file. So we must really test for the eeprom file, and not the device directory. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4167 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/eeprom/ddcmon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prog/eeprom/ddcmon b/prog/eeprom/ddcmon index 1e5b005e..fd4bea21 100755 --- a/prog/eeprom/ddcmon +++ b/prog/eeprom/ddcmon @@ -439,11 +439,11 @@ sub print_edid my ($bus, $address) = @_; my $bytes; - if (-r "/sys/bus/i2c/devices/$bus-00$address") + if (-r "/sys/bus/i2c/devices/$bus-00$address/eeprom") { $bytes = get_edid_sysfs($bus, $address); } - elsif (-r "/proc/sys/dev/sensors/eeprom-i2c-$bus-$address") + elsif (-r "/proc/sys/dev/sensors/eeprom-i2c-$bus-$address/00") { $bytes = get_edid_procfs($bus, $address); }