mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-28 12:40:42 +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:
1 parent
c4666742ca
commit
2be6de25d8
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user