On 11/23/10 14:19, Bruno Haible wrote:
> It's easy to convert EMLINK to ELOOP when O_NOFOLLOW was
> specified among the flags, in lib/open.c and lib/openat.c.

One more thing: Solaris open(...) has a Solaris-specific flag O_NOLINKS
that can cause open to fail with errno==EMLINK.  This is a valid extension
to POSIX, so if O_NOLINKS is also given the wrapper shouldn't convert
EMLINK to ELOOP.  This shouldn't add to the number of syscalls either,
but I thought I'd mention it since one can trigger that issue with
"dd oflag=nofollow,nolinks ofile=foo" on Solaris.

Come to think of it, it might be more conservative to convert EMLINK
to ELOOP only if both (1) O_NOFOLLOW is given and (2) no flags
are given other than those standardized by POSIX.

Reply via email to