This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
RE : [ECOS] Bugs in path handling for JFFS2, RAMFS and ROMFS
- From: "Vincent Catros" <Vincent dot Catros at elios-informatique dot fr>
- To: "'Andrew Lunn'" <andrew at lunn dot ch>
- Cc: <ecos-patches at ecos dot sourceware dot org>
- Date: Mon, 23 Feb 2004 11:04:30 +0100
- Subject: RE : [ECOS] Bugs in path handling for JFFS2, RAMFS and ROMFS
POSIX-1003.2-Draft-12:
2.2.2.102 pathname: A string that is used to identify a file.
A pathname consists of, at most, {PATH_MAX} bytes, including the
terminating null character. It has an optional beginning slash,
followed by zero or more filenames separated by slashes. If the pathname
refers to a directory, it may also have one or more trailing slashes.
Multiple successive slashes are considered to be the same as one slash.
A pathname that begins with two successive slashes may be interpreted in
an implementation-defined manner, although more than two leading slashes
shall be treated as a single slash. The interpretation of the pathname
is described in pathname resolution in 2.2.2.104. [POSIX.1 {8}]
Or :
http://www.opengroup.org/onlinepubs/007904975/xrat/xbd_chap04.html
(chapter : Pathname Resolution)
Regards
Vincent
> -----Message d'origine-----
> De?: Andrew Lunn [mailto:andrew@lunn.ch]
> Envoyé?: vendredi 20 février 2004 20:02
> À?: Vincent Catros
> Cc?: ecos-patches@ecos.sourceware.org
> Objet?: Re: [ECOS] Bugs in path handling for JFFS2, RAMFS and ROMFS
>
> On Fri, Feb 20, 2004 at 01:59:46PM +0100, Vincent Catros wrote:
> > Hello,
> >
> > I found 2 bugs in path handling for JFFS2, RAMFS and ROMFS.
> >
> > BUG 1 : Multi '/' path.
> > Description :
> > If you use path with multi '/' that doesn't work.
> > i.e : chdir("/tmp////tmp")
> >
> >
> > BUG 2 : '/' terminated path.
> > If you use path terminated with a '/' that doesn't work.
> > i.e : chdir("/tmp/")
> >
> > Proposed patchs fixe this issues.
>
> I know this is generally accepted with unix like systems, but could
> somebody point me towards a section of the POSIX standard that states
> this?
>
> Thanks
> Andrew