2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-01 14:55:27 +00:00

Preallocate memory for the I2C_FUNCS ioctl. This should fix ticket #2138.

It might as well be a bug in Fedora Core 3's perl, but the workaround is
cheap anyway.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4229 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2006-11-10 09:19:48 +00:00
parent c9d758c669
commit d3d7118778
2 changed files with 3 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ SVN HEAD
Program sensors-detect: Add SMSC DME1737 detection Program sensors-detect: Add SMSC DME1737 detection
Add EPoX EP1308 detection (Hans Edgington) Add EPoX EP1308 detection (Hans Edgington)
Add Intel Core thermal sensor detection Add Intel Core thermal sensor detection
Preallocate memory for I2C_FUNCS ioctl (#2138)
2.10.1 (20060924) 2.10.1 (20060924)
File doc/developers/checklist renamed to dev/developers/release_checklist File doc/developers/checklist renamed to dev/developers/release_checklist

View File

@@ -2392,9 +2392,9 @@ use constant I2C_FUNC_SMBUS_READ_BYTE => 0x00020000;
sub i2c_get_funcs($) sub i2c_get_funcs($)
{ {
my $file = shift; my $file = shift;
my $funcs; my $funcs = pack "L", 0; # Allocate space
ioctl $file, IOCTL_I2C_FUNCS, $funcs='' or return -1; ioctl $file, IOCTL_I2C_FUNCS, $funcs or return -1;
$funcs = unpack "L", $funcs; $funcs = unpack "L", $funcs;
return $funcs; return $funcs;