On Wed, 2002-06-26 at 23:12, Jens Owen wrote: > Eric Anholt wrote: > > > > Log message: > > The drmCommand interface was passing a size to DRM_IOR() and friends, > > when DRM_IOR was expecting a type, so on BSD only an int was copied in/out of > > the kernel. Make drmCommand use new DRM_IOC(), which expects a size. > > Good catch! I'm surprised this worked at all under Linux.
Well, Linux (AFAIK) doesn't even care about the size passed in through ioctl, since our drivers in Linux try to copy in the actual size of the struct, not what the userland said the size was. On BSD the copyin is done by the ioctl syscall before passing the data to the per-ioctl handler. Really, the linux way is better for our code. I once poked at making the copyins work like linux, but it would have been ugly. -- Eric Anholt <[EMAIL PROTECTED]> http://gladstone.uoregon.edu/~eanholt/dri/ ------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel