Re: procfs problems

yuri mironoff (yuri@buster.rgti.com)
Tue, 29 Apr 1997 11:03:23 -0400 (EDT)


On 29 Apr 1997, Henning Schmiedehausen wrote:

> mwood@mhw.OIT.IUPUI.EDU (Mark H. Wood) writes:
>
> >they want it nicely formatted for the eye. Isn't there some way to
> >reconcile the two views, or at least settle which one is correct?
>
> /proc/humans
> /proc/machines
>

Why does the machine readable interface have to be through /proc
at all? All you're doing here is converting binary to ascii and then
to binary again. Why not implement it in ioctl and then call the same
functions in the /proc API. ie:

/proc <-----+
|
+-- ioctl implementation <-- kernel info
|
ioctl() <---+

It would make things much more uniform. People who want to use Perl,
awk and cat could parse /proc and others who need more speed and efficiency
could use the ioctl() interface.

Regards,

Y.