This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: [David Madore <madore@quatramaran.ens.fr>] libc/1638: O_NOLINK documented but not implemented
- To: tb at MIT dot EDU (Thomas Bushnell, BSG)
- Subject: Re: [David Madore <madore@quatramaran.ens.fr>] libc/1638: O_NOLINK documented but not implemented
- From: James Antill <james at and dot org>
- Date: 09 Mar 2000 13:48:58 -0500
- Cc: libc-alpha Mailinglist <libc-alpha at sourceware dot cygnus dot com>, Andreas Jaeger <aj at suse dot de>
- References: <u8put5x3xz.fsf@gromit.rhein-neckar.de> <nnsny130uy.fsf@code.and.org> <u1hhfeg5dad.fsf@pusey.mit.edu>
- Reply-To: <james at and dot org>
tb@MIT.EDU (Thomas Bushnell, BSG) writes:
> James Antill <james@and.org> writes:
>
> > Andreas Jaeger <aj@suse.de> writes:
> >
> > Well from the info explanation O_NOLINK == O_NOFOLLOW in Linux, so
> > glibc should probably define both (or maybe hurd could just change to
> > O_NOFOLLOW ?).
> > As far as I know, _IGNORE_CTTY and _NOTRANS aren't implemented in
> > Linux though.
>
> O_NOLINK and O_NOFOLLOW are different on the Hurd;
> libc/sysdeps/mach/hurd/fcntl.h says:
>
> # define O_NOLINK 0x0040 /* No name mappings on final component. */
> # define O_NOFOLLOW 0x00100000 /* Produce ENOENT if file is a symlink. */
>
> which are notably different.
Ahhh, looking more closely at Linux it appears that it returns ELOOP
in the NOFOLLOW case not a valid fd[1]. So it looks like Linux doesn't
implement O_NOLINK at all.
Ps. It's probably worth changing the errno on NOFOLLOW in hurd (or is
there a good reason why it's ENOENT) ?.
[1] presumably this is intentional, although the code do_follow_link()
suggests that it would return a valid fd and that open_namei() just
forgot about that case.
--
James Antill -- james@and.org
"If we can't keep this sort of thing out of the kernel, we might as well
pack it up and go run Solaris." -- Larry McVoy.