mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-30 05:48:07 +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:
parent
de7c9fe6b0
commit
3fa3461913
@ -2152,9 +2152,9 @@ sub initialize_dmi_data
|
|||||||
);
|
);
|
||||||
|
|
||||||
# First try reading the strings from sysfs if available
|
# 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) {
|
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 {
|
||||||
# Else fallback on calling dmidecode
|
# Else fallback on calling dmidecode
|
||||||
@ -5248,7 +5248,7 @@ sub main
|
|||||||
|
|
||||||
if (!keys %chips_detected) {
|
if (!keys %chips_detected) {
|
||||||
print "Sorry, no sensors were detected.\n";
|
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".
|
print "This is relatively common on laptops, where thermal management is\n".
|
||||||
"handled by ACPI rather than the OS.\n";
|
"handled by ACPI rather than the OS.\n";
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user