Joerg Schilling wrote:
Linda Walsh
wrote: Jan Engelhardt wrote:
On Thursday 2013-08-08 23:37, Linda Walsh wrote:
Does linux remove // from the paths before passing them to drivers? Yes, see fs/namei.c:link_path_walk:
static int link_path_walk(const char *name, struct nameidata *nd) { struct path next; int err;
while (*name=='/') name++;
But that is not a problem, because drivers only have to answer to the VFS, not to the user.
But VFS, unlike 'users' has it's own bug subcategory under "filesystems" in the lkml bugzilla... ;-)
`Sides's wouldn't it be better behavior to have it be POSIX compatible and preserve the '//' and and hand off the path to drivers (user-mode or kernel) un-mangled?
As mentioned several time before: POSIX does not require to preserve //. POSIX just permits to preserve // in order to allow to implement the Integrated Solutions global filesystem semantics.
This is a quote from POSIX: Linda Walsh wrote:
3.269 Path Prefix
The part of a pathname up to, but not including, the last component and any trailing <slash> characters, unless the pathname consists entirely of <slash> characters, in which case the path prefix is '/' for a pathname containing either a single <slash> or three or more <slash> characters, and '//' for the pathname //.
---- If you are going to return the path prefix before the filename, you must preserve '//', or you are not following the above direct quote from POSIX 2008. It may have *permitted* it before in the older standard, I would _well_ believe, as I said, POSIX, post~2002 has gone beyone their charter to be descriptive and not prescriptive. As the standard stands now, retaining '//' is *prescriptive*. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org