From 2be6de25d87a6250cd3356e5b1bb09156a8fcc6b Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Sun, 8 Jun 2003 20:24:51 +0000 Subject: [PATCH] C format fix from Jim Morris 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 --- prog/detect/sensors-detect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 5829b404..ba5c8d40 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -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;