summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/setmode.3
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-03-23 19:44:18 +0000
committerpfg <pfg@FreeBSD.org>2015-03-23 19:44:18 +0000
commit4b3661b3a78dc737e0be3bc94b29dad1b80fa79e (patch)
tree542a58f40a1d69baf66298e11860367c5974a773 /lib/libc/gen/setmode.3
parentfb3af63da5f1d38669584e79f3488abc792abec5 (diff)
downloadFreeBSD-src-4b3661b3a78dc737e0be3bc94b29dad1b80fa79e.zip
FreeBSD-src-4b3661b3a78dc737e0be3bc94b29dad1b80fa79e.tar.gz
MFC r279186:
setmode(3): Make sure that setmode sets errno on failure. Our man page already documented this partially but now we provide more consistent behavior. PR: 136669 Obtained from: NetBSD (CVS rev. 1.31, 1.33) Relnotes: yes
Diffstat (limited to 'lib/libc/gen/setmode.3')
-rw-r--r--lib/libc/gen/setmode.317
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/libc/gen/setmode.3 b/lib/libc/gen/setmode.3
index 5cab44a..684c2e1 100644
--- a/lib/libc/gen/setmode.3
+++ b/lib/libc/gen/setmode.3
@@ -28,7 +28,7 @@
.\" @(#)setmode.3 8.2 (Berkeley) 4/28/95
.\" $FreeBSD$
.\"
-.Dd April 28, 1995
+.Dd February 22, 2015
.Dt SETMODE 3
.Os
.Sh NAME
@@ -99,7 +99,20 @@ The
function
may fail and set errno for any of the errors specified for the library
routine
-.Xr malloc 3 .
+.Xr malloc 3
+or
+.Xr strtol 3 .
+In addition,
+.Fn setmode
+will fail and set
+.Va errno
+to:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The
+.Fa mode
+argument does not represent a valid mode.
+.El
.Sh SEE ALSO
.Xr chmod 1 ,
.Xr stat 2 ,
OpenPOWER on IntegriCloud