Linda Walsh
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. I cannot speck for Linux as I know that Linux has many deviations from the VFS design... In the original VFS design, there is a path name layer that handles path name separators and a lookup layer that calls filesystem specific VOP_LOOKUP() functions for path name component lookup. As mentione before, in theory, the lookup layer could be enhanced in order to give special semantics to an empty path name component directly located underneath the root directory of the system. Jörg -- EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin js@cs.tu-berlin.de (uni) joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org