Re: PROPOSAL: dot-proc interface [was: /proc stuff]

Ben Greear (greearb@candelatech.com)
Mon, 05 Nov 2001 14:58:50 -0700


Tim Jansen wrote:

> On Monday 05 November 2001 19:40, Rik van Riel wrote:
>
>>I think you've hit the core of the problem. There is no magical
>>bullet which will stop badly written userland programs from
>>breaking, but the kernel developers should have the courtesy
>>of providing documentation for the /proc files so the writers
>>of userland programs can have an idea what to expect.
>>
>
> I think the core insight is that if the kernel continues to have dozens of
> "human-readable" file formats in /proc, each should to be documented using a
> BNF description that can guarantee that the format is still valid in the
> future, even if there is the need to add additional fields.
> The result of this is, of course, that it may be very hard to write
> shell scripts that won't break sooner or later and that accessing the data in
> C is much more work than a simple scanf.

So if BNF makes it harder for shell scripts and sscanf, and harder for
the kernel developers...what good does it do??? I definately don't advocate
anything more than some simple documentation about whatever format the proc
module writer uses. All of these interfaces (proc, ioctl, ...) end up being
hacks at some point, but a _documented_ hack can be called a feature :)

>
> bye...
> -
> 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/
>
>

-- 
Ben Greear <greearb@candelatech.com>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

- 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/