Message24110
Logged In: YES
user_id=6757
The problem seems to be that Python integers are "long int,"
while the type expected by ioctl(2) is "unsigned long int"
(on AMD64, at least).
My hackish workaround is to coerce the ioctl number to a
signed quantity:
op = struct.unpack('i', struct.pack('I', op))[0]
Once it gets into the C code, the signed quantity is then
coerced back to unsigned long int by the ioctl call (after
an intermediate stop as (signed) int).
Probably, the correct course of action here is to figure out
what type ioctl(2) uses on a particular architecture and
adjust the PyArgs_ParseTuple() call and the type of "op"
accordingly. |
|
Date |
User |
Action |
Args |
2007-08-23 14:29:15 | admin | link | issue1112949 messages |
2007-08-23 14:29:15 | admin | create | |
|