mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
open(2): Clarify non-POSIX error when opening a symlink with O_NOFOLLOW.
We return [EMLINK] instead of [ELOOP] when trying to open a symlink with O_NOFOLLOW, so that the original case of [ELOOP] can be distinguished. Code like cmp -h and xz takes advantage of this. PR: 214633 Reviewed by: kib, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8586
This commit is contained in:
parent
e10312ca7b
commit
295159dfa3
1 changed files with 17 additions and 1 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
.\" @(#)open.2 8.2 (Berkeley) 11/16/93
|
.\" @(#)open.2 8.2 (Berkeley) 11/16/93
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd September 30, 2016
|
.Dd November 22, 2016
|
||||||
.Dt OPEN 2
|
.Dt OPEN 2
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
|
@ -503,6 +503,22 @@ The
|
||||||
.Fn openat
|
.Fn openat
|
||||||
function was introduced in
|
function was introduced in
|
||||||
.Fx 8.0 .
|
.Fx 8.0 .
|
||||||
|
.Sh STANDARDS
|
||||||
|
These functions are specified by
|
||||||
|
.St -p1003.1-2008 .
|
||||||
|
.Fx
|
||||||
|
sets
|
||||||
|
.Va errno
|
||||||
|
to
|
||||||
|
.Er EMLINK instead of
|
||||||
|
.Er ELOOP
|
||||||
|
as specified by
|
||||||
|
.Tn POSIX
|
||||||
|
when
|
||||||
|
.Dv O_NOFOLLOW
|
||||||
|
is set in flags and the final component of pathname is a symbolic link
|
||||||
|
to distinguish it from the case of too many symbolic link traversals
|
||||||
|
in one of its non-final components.
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
The Open Group Extended API Set 2 specification requires that the test
|
The Open Group Extended API Set 2 specification requires that the test
|
||||||
for whether
|
for whether
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue