2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-03 07:45:30 +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:
Jean Delvare
2003-06-28 08:25:19 +00:00
parent abec4c64eb
commit 65b3af0ad5
2 changed files with 18 additions and 7 deletions

View File

@@ -101,7 +101,8 @@ ask CVS about it:
Support dmidecode 2.0 and later; Support dmidecode 2.0 and later;
Fix "C" format error; Fix "C" format error;
Add support for adm1026, 82801EB (ICH5), W83791D; Add support for adm1026, 82801EB (ICH5), W83791D;
Add support for w83l785ts, nForce2 Add support for w83l785ts, nForce2;
Fix UTF-8 incompatibility
2.7.0 (20021208) 2.7.0 (20021208)
NOTE: Requires i2c-2.7.0 or newer. NOTE: Requires i2c-2.7.0 or newer.

View File

@@ -1340,7 +1340,15 @@ sub any_list_match
sub initialize_ioports 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 # $_[0]: port to read
@@ -1362,7 +1370,7 @@ sub outb
{ {
if ($_[1] > 0xff) 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", print "\n*** Called outb with value=$_[1] from line $line\n",
"*** (in $sub). PLEASE REPORT!\n", "*** (in $sub). PLEASE REPORT!\n",
"*** Terminating.\n"; "*** Terminating.\n";
@@ -3547,8 +3555,9 @@ sub main
} else { } else {
print " Do you want to scan the ISA bus? (YES/no): "; print " Do you want to scan the ISA bus? (YES/no): ";
if (not <STDIN> =~ /^\s*[Nn]/) { if (not <STDIN> =~ /^\s*[Nn]/) {
initialize_ioports or die "Sorry, can't access /dev/port ($!)?!?"; initialize_ioports();
scan_isa_bus; scan_isa_bus();
close_ioports();
} }
} }
@@ -3562,8 +3571,9 @@ sub main
} else { } else {
print " Do you want to scan for Super I/O sensors? (YES/no): "; print " Do you want to scan for Super I/O sensors? (YES/no): ";
if (not <STDIN> =~ /^\s*[Nn]/) { if (not <STDIN> =~ /^\s*[Nn]/) {
initialize_ioports or die "Sorry, can't access /dev/port ($!)?!?"; initialize_ioports();
scan_superio; scan_superio();
close_ioports();
} }
} }