How about something along the lines of the current behaviour (dump all
fields as formatted ascii) for processes which simply read() proc, but
allow specific queries by a write() to proc, followed by a read()
which returns the value of the parameter requested by write(), or an
error. Maybe allow multiple write()s followed by a single read().
As soon as you add this level of complexity to the system, you're going
to need to be doing real programming to get stuff out of /proc. In
which case, why not just use the ioctl() routines to get the values out
and be done with it?
- Ted