Christopher Hoover wrote:
Perhaps it would be better to hand parse the structure out?
There's already kernel code that has to parse it out, for translating
32bit usbfs ioctls to 64bit ones ... something to consider.


That's certainly a workable solution.  Any structures passed up from
user space to the kernel would likewise need to be similarly hand
parsed.  We need to audit the code to see where else this might show up.

Another possibility is to have a "mirror" unpacked structure for each
structure passed back and forth.  That's kind of gross though.
Note that the 2.5 kernel has <linux/usb_ch9.h> that only holds standard
USB constants.  It's all set up for use from user mode, with types
like "__u16 wValue" ... like <linux/usb.h> in 2.4, but without all the
extra host-only things.  Structures are "__attribute__((packed))".

Portability to BSD (what other platforms support libusb lately?) could
just macro-vanishize the gcc attribute, as it'd handle __u16 and so on.

- Dave






-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to