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

Daniel Kobras (kobras@tat.physik.uni-tuebingen.de)
Sun, 4 Nov 2001 14:36:31 +0100


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.

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