mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-02 07:15:39 +00:00
Fix UTF-8 incompatibility. Thanks a lot to Jim Morris for testing!
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1819 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -1340,7 +1340,15 @@ sub any_list_match
|
||||
|
||||
sub initialize_ioports
|
||||
{
|
||||
sysopen IOPORTS, "/dev/port", 2;
|
||||
sysopen (IOPORTS, "/dev/port", O_RDWR|O_BINARY)
|
||||
or die "/dev/port: $!\n";
|
||||
binmode (IOPORTS, ':raw');
|
||||
}
|
||||
|
||||
sub close_ioports
|
||||
{
|
||||
close (IOPORTS)
|
||||
or print "Warning: $!\n";
|
||||
}
|
||||
|
||||
# $_[0]: port to read
|
||||
@@ -1362,7 +1370,7 @@ sub outb
|
||||
{
|
||||
if ($_[1] > 0xff)
|
||||
{
|
||||
my ($package, $filename, $line, $sub) = caller(1);
|
||||
my ($package, $filename, $line, $sub) = caller(1);
|
||||
print "\n*** Called outb with value=$_[1] from line $line\n",
|
||||
"*** (in $sub). PLEASE REPORT!\n",
|
||||
"*** Terminating.\n";
|
||||
@@ -3547,8 +3555,9 @@ sub main
|
||||
} else {
|
||||
print " Do you want to scan the ISA bus? (YES/no): ";
|
||||
if (not <STDIN> =~ /^\s*[Nn]/) {
|
||||
initialize_ioports or die "Sorry, can't access /dev/port ($!)?!?";
|
||||
scan_isa_bus;
|
||||
initialize_ioports();
|
||||
scan_isa_bus();
|
||||
close_ioports();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3562,8 +3571,9 @@ sub main
|
||||
} else {
|
||||
print " Do you want to scan for Super I/O sensors? (YES/no): ";
|
||||
if (not <STDIN> =~ /^\s*[Nn]/) {
|
||||
initialize_ioports or die "Sorry, can't access /dev/port ($!)?!?";
|
||||
scan_superio;
|
||||
initialize_ioports();
|
||||
scan_superio();
|
||||
close_ioports();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user