[issue2712] enhanced ioctl

2008-04-29 Thread ndbecker
ndbecker <[EMAIL PROTECTED]> added the comment: OK. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue2712] enhanced ioctl

2008-04-28 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: I think we should close it. -- resolution: -> works for me status: open -> closed __ Tracker <[EMAIL PROTECTED]> __

[issue2712] enhanced ioctl

2008-04-28 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: So, should we close this? -- nosy: +benjamin.peterson __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2712] enhanced ioctl

2008-04-28 Thread ndbecker
ndbecker <[EMAIL PROTECTED]> added the comment: On Monday 28 April 2008, Martin v. Löwis wrote: > Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > > Passing structures is certainly possible. I'd try > > args = struct.pack("iP", len(c), cast (pointer (c), c_void_p).value) > fcntl.ioctl(fd,

[issue2712] enhanced ioctl

2008-04-28 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Passing structures is certainly possible. I'd try args = struct.pack("iP", len(c), cast (pointer (c), c_void_p).value) fcntl.ioctl(fd, request, args) Alternatively, args = eos_dl_args_t() ... args_p = cast(pointer(args), c_void_ptr).value

[issue2712] enhanced ioctl

2008-04-28 Thread ndbecker
ndbecker <[EMAIL PROTECTED]> added the comment: On Monday 28 April 2008, Martin v. Löwis wrote: > Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > > IIUC, current ioctl is not capable of handling arbitrary argument > > types. > > Can you please be a bit more explicit? What limitation do y

[issue2712] enhanced ioctl

2008-04-28 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > IIUC, current ioctl is not capable of handling arbitrary argument > types. Can you please be a bit more explicit? What limitation do you see in fcntl.ioctl, and how does this fragment overcome the limitation? AFAICT, they do exactly the s

[issue2712] enhanced ioctl

2008-04-28 Thread ndbecker
New submission from ndbecker <[EMAIL PROTECTED]>: IIUC, current ioctl is not capable of handling arbitrary argument types. This code will allow any arg type (such as structures with pointers to embedded structures). The code for _IOC is taken from linux and might not be portable.import -