Skip to contentSkip to conversation

add path-oriented proc_mkdir_path() function to /proc

PATCH Edward Falk 1 participant 1 message May 10, 2004

lore
Share & tools
lore
#0 lore raw

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

Quoted 11 lines

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, [email protected]