2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-05 08:45:26 +00:00

C format fix from Jim Morris <morris@wolfman.com>

This seems to happen on newer perl versions.
It is fatal in as much as the sensors are not detected.
The solution appears to be to simply add & 0x7f to the
pack statement at line 1138 of sensors_detect...

sub outb
{
  my $towrite = pack( "C", $_[1] & 0x7f);


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1774 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker
2003-06-08 20:24:51 +00:00
parent c4666742ca
commit 2be6de25d8

View File

@@ -1309,7 +1309,7 @@ sub inb
# Returns: -1 on failure, 0 on success.
sub outb
{
my $towrite = pack "C", $_[1];
my $towrite = pack("C", $_[1] & 0x7f);
sysseek IOPORTS, $_[0], 0 or return -1;
my $nrchars = syswrite IOPORTS, $towrite, 1;
return -1 if not defined $nrchars or $nrchars != 1;