Re: Suggested dual human/binary interface for proc/devfs

From: Ragnar Kjørstad (kernel@ragnark.vestdata.no)
Date: Tue Apr 11 2000 - 03:24:56 EST


On Sun, Apr 09, 2000 at 01:06:18PM -0700, Dunlap, Randy wrote:
> > I am actualy growing fonder of the method of using the filesystem
> > completely and having no more than one value per file where
> > the filename
> > is the attribute and the data is the value.
>
> So with one value per "file," how do you handle the
> well-known problem of inconsistent data, i.e.,
> one or more values being updated, program reads
> file value(s), some more value(s) updated, program
> reams some more value(s)?

How about just ignoring the problem for the /proc interface? Non of the
suggested solutions would work well for simple shell-scripts anyway.

The suggested sysctl_s interface could be expanded to allow more than
one variabel to be manipulated at the time; making it possible for "real
programs" to get a consistent view of the variables when they need.

This would allow for the one-value-in-file approach and totally
eliminate the need for parsing.

-- 
Ragnar Kjørstad

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:15 EST