Re: [PATCH] 2.5 PROPOSAL: Replacement for current /proc of shit.

Daniel Kobras
2001-11-04T13:38:40Z

On Sun, Nov 04, 2001 at 01:30:06PM +0100, Tim Jansen wrote:
> The problem is that it is almost impossible to offer human-readable
> interfaces that will be backward-compatible. As soon as you have a
> well-formatted output, like /proc/partitions, you can not add a new field
> without breaking user-space applications.
> What you could do is to establish rules for files like /proc/partitions ("if
> there are more than 4 space-separated alphanumeric strings per line in
> /proc/partitions then ignore the additional fields"), but you won't find such
> a rule that is useful for every file and still offers a nice human-readable
> format.

Certainly you can further fields without breaking (well-written) apps. That's
what the first line in /proc/partitions is for. When adding a new column,
you also give it a new tag in the header. Ask RedHat how many apps broke
when they started patching sard into their kernels.

Adding new fields is even easier with /proc/stat-style key:value pairs. Both
styles are human- as well as machine readable. Problems only arise when
someone changes the semantics of a certain field without changing the tag.
But luckily these kinds of changes never happen in a stable kernel series...

Regards,

Daniel.