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 committed 2006-11-10 09:19:48 +00:00
1 parent c9d758c669
commit d3d7118778
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -22,6 +22,7 @@ SVN HEAD
Program sensors-detect: Add SMSC DME1737 detection
Add EPoX EP1308 detection (Hans Edgington)
Add Intel Core thermal sensor detection
Preallocate memory for I2C_FUNCS ioctl (#2138)
2.10.1 (20060924)
File doc/developers/checklist renamed to dev/developers/release_checklist
+2 -2
View File
@@ -2392,9 +2392,9 @@ use constant I2C_FUNC_SMBUS_READ_BYTE => 0x00020000;
sub i2c_get_funcs($)
{
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;
return $funcs;