Changeset 4137

Show
Ignore:
Timestamp:
09/03/06 10:07:59 (7 years ago)
Author:
khali
Message:

Don't hardcode /sys, use $sysfs_root instead.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/detect/sensors-detect

    r4136 r4137  
    27962796      my ($device, $driver); 
    27972797      if (defined($sysfs_root)) { 
    2798         $device = sprintf("/sys/bus/i2c/devices/\%d-\%04x", 
     2798        $device = sprintf("$sysfs_root/bus/i2c/devices/\%d-\%04x", 
    27992799                             $adapter_nr, $addr); 
    28002800        $driver = sysfs_device_driver($device); 
     
    53245324        "scanned by manually loading the modules before running this script.\n\n"; 
    53255325 
    5326   if (!exists($modules_list{"i2c-dev"}) && ! -e "/sys/class/i2c-dev") { 
     5326  if (!exists($modules_list{"i2c-dev"}) 
     5327   && !(defined $sysfs_root && -e "$sysfs_root/class/i2c-dev")) { 
    53275328    print "To continue, we need module `i2c-dev' to be loaded.\n"; 
    53285329    print "If it is built-in into your kernel, you can safely skip this.\n"