aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2024-01-26 15:19:04 +0000
committerEd Maste <emaste@FreeBSD.org>2024-03-22 13:30:30 +0000
commitc3c75c142c0cb9fe9bf166e3416195bc59ad0e12 (patch)
treee4fcf5b05b85e39d1b475e7a6b3955a16678052c
parent0416bffd5183372a42feecee54d87d100210803e (diff)
downloadsrc-c3c75c142c0cb9fe9bf166e3416195bc59ad0e12.tar.gz
src-c3c75c142c0cb9fe9bf166e3416195bc59ad0e12.zip
open: make non-POSIX errno value more apparent
In the errno list, add an explicit note and reference to the note in the STANDARDS section. When O_NOFOLLOW is specified and the target is a symbolic link FreeBSD sets errno to a value different than that specified by POSIX. Commit 295159dfa3ed added a note to this effect, but I missed it when reading through the list of errno values. PR: 214633 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43618 (cherry picked from commit ea6a6b63e1fd304e790c8ed7627caf5e3ba52bc7)
-rw-r--r--lib/libc/sys/open.25
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2
index 67a059db10da..383dd58b2a31 100644
--- a/lib/libc/sys/open.2
+++ b/lib/libc/sys/open.2
@@ -487,6 +487,10 @@ The system file table is full.
.It Bq Er EMLINK
.Dv O_NOFOLLOW
was specified and the target is a symbolic link.
+.Tn POSIX
+specifies a different error for this case; see the note in
+.Sx STANDARDS
+below.
.It Bq Er ENXIO
The named file is a character special or block
special file, and the device associated with this special file
@@ -649,6 +653,7 @@ is set, and the process is in capability mode.
.Sh STANDARDS
These functions are specified by
.St -p1003.1-2008 .
+.Pp
.Fx
sets
.Va errno