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:
1
CHANGES
1
CHANGES
@@ -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
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user