Re: Suggested dual human/binary interface for proc/devfs

From: Richard Gooch (rgooch@ras.ucalgary.ca)
Date: Tue Apr 04 2000 - 16:26:22 EST


Alexander Viro writes:
>
>
> On Tue, 4 Apr 2000, Richard Gooch wrote:
>
> > If not ioctl(2), then what other interface would you propose for
> > binary data? I don't accept the argument that everything should be in
> > ASCII format.
>
> And it's my problem in which way? Compare the cost of conversion from
> ASCII to binary and back with the cost of syscall. Watch it disappear in
> noise. If your program constantly calls ioctl() - it's doing something
> very wrong.
>
> --
> echo 57600,8,n,1 > /dev/serial/ttyS0ctl should work.

Well, time to throw back one of the old anti-devfs arguments:
bloat. Parsing ASCII is a lot harder than dereferencing structure
fields.

Let's also distinguish between ASCII *output* and input. ASCII output
makes some sense, but to force everything to be input in ASCII will
just bloat the kernel. Let's put perl into the kernel too so that
parsing ASCII will be easier.

Besides, people are less likely to tamper with a binary interface.
People seem more afraid of being chased by angry, nutcracker-weilding
hackers if they fiddle with a binary interface. ASCII has come to mean
"human interface, let's go and make it more pretty".

Frankly, I'm surprised that someone hasn't submitted a patch to make
some procfs file output the right escape codes to generate a
multi-coloured output line.
"But it looks so *pretty*".

                                Regards,

                                        Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca

-
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:13 EST