On Fri, 7 Apr 2000, Pavel Machek wrote:
> Hi!
>
> > > Binary interfaces are the natural interface for programmes. ASCII
> > > interfaces are the natural interface for humans. We need to support
> > > both.
> >
> > OK, tell me when was the last time when you've used a lot of
> > ioctl()s in your code. How often were they called? Examples,
> > please.
>
> [You wanted example, here you are].
>
> Take a look how usbdevfs is done. AFAICS, it is build on ioctls
> [example from usbd/example]:
So we have a recently-added braindead interface. Wow.
> static int usb_control_msg(int fd, u_int8_t requesttype, u_int8_t
> request, u_int16_t value,
> u_int16_t index, unsigned int size, void
> *data)
> {
> struct usb_proc_ctrltransfer ctrl;
>
> ctrl.requesttype = requesttype;
> ctrl.request = request;
> ctrl.value = value;
> ctrl.index = index;
> ctrl.length = size;
> ctrl.data = data;
> return ioctl(fd, USB_PROC_CONTROL, &ctrl);
> }
>
> Communication with usb device will be mostly done with stuff like
> that...
Too bad - that's actually an example of people _not_ understanding UNIX.
Heck, since they got a filesystem to play with, why not create file such
that writing there would give the effect of monster above?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:18 EST