[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glibc: changing file_name_split()'s interface slightly to fix the "/
Re: glibc: changing file_name_split()'s interface slightly to fix the "/" case
Sun, 13 Jun 2010 02:51:06 -0700 (PDT)
> You mean directory_name_split("/") should return (<root port>, "") ?
I do. "This is the same as file_name_split, but ignores trailing slashes."
So directory_name_split ("////") should return (crdir, "") too.
End of story.
> This makes mkdir(), for instance, fail with EINVAL as well.
Well, what should it do? I suppose it should fail with EEXIST instead.
That seems like a filesystem server problem, not a client-side problem.
> Should it be handled on a case-by-case basis in the individual POSIX
> calls (mkdir, rmdir, link, unlink, ...) ?
No, that's what the *_split calls are for.
For "/", all these mean an RPC made on the root directory port itself.
What could mkdir, rmdir, or unlink possibly mean for the root of a tree?
For link, we're talking about the target, i.e. "ln something /", so the
question is the same.