Messages in this thread |  | | Date | Tue, 22 May 2001 09:33:43 -0400 | Subject | Re: [RFD w/info-PATCH] device arguments from lookup, partion code | From | Jan Harkes <> |
| |
On Mon, May 21, 2001 at 03:10:32PM -0700, Linus Torvalds wrote: > That, in turn, might be as simple as changing the ioctl incoming arguments > of <cmd,arg> into a structure like <type,cmd,inbuf,inlen,outbuf,outlen>.
At least make sure that the 'kioctl' returns the number of bytes placed into the output buffer, as userspace doesn't necessarily know how much data would be returned. Coda's kernel module forwards control data up to userspace and uses a reasonably messy 'pioctl' wrapper (also used by AFS afaik) around an ioctl to inform the kernel module of how much data to copy through.
something like,
ssize_t kioctl(int fd, int type, int cmd, void *inbuf, size_t inlen, void *outbuf, size_t outlen);
As far as functionality and errors it works like read/write in a single call, pretty much what Richard proposed earlier with a new 'transaction' syscall. Maybe type is not needed, and cmd can be part of the inbuf in which case it would be identical. I guess that type is introduced to resolve existing ioctl number collisions.
Jan
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |