2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-29 13:28:01 +00:00

Replace hard-coded /sys with $sysfs_root.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5529 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare 2008-12-05 18:01:09 +00:00
parent de7c9fe6b0
commit 3fa3461913

View File

@ -2152,9 +2152,9 @@ sub initialize_dmi_data
);
# First try reading the strings from sysfs if available
if (-d '/sys/devices/virtual/dmi/id') {
if (-d "$sysfs_root/devices/virtual/dmi/id") {
foreach my $k (keys %items) {
$dmi{$k} = sysfs_device_attribute("/sys/devices/virtual/dmi/id", $k);
$dmi{$k} = sysfs_device_attribute("$sysfs_root/devices/virtual/dmi/id", $k);
}
} else {
# Else fallback on calling dmidecode
@ -5248,7 +5248,7 @@ sub main
if (!keys %chips_detected) {
print "Sorry, no sensors were detected.\n";
if (is_laptop() && -d "/sys/firmware/acpi") {
if (is_laptop() && -d "$sysfs_root/firmware/acpi") {
print "This is relatively common on laptops, where thermal management is\n".
"handled by ACPI rather than the OS.\n";
} else {