[lkml]   [1999]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: I discussed reading directories as files with jra, Stallman, and loic
root <> writes:
> I convinced him that directories can do this, and do it cleaner than
> that MS crud they use as an FS model. The directories need a few
> features added though.
> First, they need to be able to have a file that when you read them they
> resolve to.

Why not just do it this way..:

int do_open(char *name, int flags) {
int res = open(name, flags);
if(res == -1 && errno == EISDIR) {
char defname[strlen(name)+9];
sprintf(defname, "%s/default", name);
res = open(defname, flags);
return res;

> Next files need to be able to inherit stat data, so that a file can
> share its modification time with its parent directory, so that modifying
> the file changes the mod time on the directory.
Hmmm... why does the directory need a modification time at all, then? Just
stat the file first (reverse code than above, check for ENODIR).

> * implement a write which when done to a file with an inheritance flag
> set on it will look for and parse an rdf style syntax to determine how
> to perform the write.
Ugh, I do think that one should be in a library somewhere.

In the specific case of /etc/services, which should be ordered but only
because the first matching entry "wins". /etc/services is a good example
because I wonder what you'd use as file name in the first place -- the
service name? The number? Any one of the aliases? IMHO the file doesn't
really fit the directory lookup paradigm at all. So why try and force it
into one?

Matthias Urlichs | noris network GmbH | | ICQ: 20193661
The quote was selected randomly. Really. |
What is the approximate air speed of an unladen swallow ?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:52    [W:0.148 / U:4.416 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site