Re: [PATCH] add path-oriented proc_mkdir_path() function to /proc

From: Edward Falk
Date: Mon May 10 2004 - 18:28:33 EST


[patch to allow creation of e.g. /proc/foo/bar/ with one function call.]

> Hmm.. Looks like a useful utility function (there's certainly enough deep
> trees in my /proc/sys tree), but I wonder...
>
> 1) Do we have cases where code should be implementing "it had *better* exist"
> checks? This may be important if an intermediate directory "should have" been
> created by sysctl or something, and has special permission needs..
>
> 2) Alternatively, does using this open up accidental collisions where we should
> have checked something *doesnt* exist already, and complain if it does?
>
> (Feel free to address either one by adding a "Dont do that then" comment ;)

Don't do that, then. :)

OK, long answer:

1 & 2) are beyond the scope of my patch, but it seems to me that
additional functionality could be added -- perhaps in the form of O_CREAT,
O_EXCL flags -- if demand warranted it. Perhaps this could be done in
a later patch?

-ed falk, efalk@xxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/