summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/gettimeofday.2
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2013-04-08 06:26:12 +0000
committerguenther <guenther@openbsd.org>2013-04-08 06:26:12 +0000
commitf9d2c6d3000fb36321153ee00968dcadb563391c (patch)
treec0983de00e07bf62d154d8cbeb5efc21d08f5f67 /lib/libc/sys/gettimeofday.2
parentFix typo in ale_stop_mac(). (diff)
downloadwireguard-openbsd-f9d2c6d3000fb36321153ee00968dcadb563391c.tar.xz
wireguard-openbsd-f9d2c6d3000fb36321153ee00968dcadb563391c.zip
Updates to SYNOPSIS, ERRORS, and STANDARDS.
Diffstat (limited to 'lib/libc/sys/gettimeofday.2')
-rw-r--r--lib/libc/sys/gettimeofday.223
1 files changed, 18 insertions, 5 deletions
diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2
index 8c3b0e5afe6..cf181b31ca5 100644
--- a/lib/libc/sys/gettimeofday.2
+++ b/lib/libc/sys/gettimeofday.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: gettimeofday.2,v 1.21 2011/11/07 11:24:30 schwarze Exp $
+.\" $OpenBSD: gettimeofday.2,v 1.22 2013/04/08 06:26:12 guenther Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)gettimeofday.2 8.2 (Berkeley) 5/26/95
.\"
-.Dd $Mdocdate: November 7 2011 $
+.Dd $Mdocdate: April 8 2013 $
.Dt GETTIMEOFDAY 2
.Os
.Sh NAME
@@ -110,11 +110,19 @@ A \-1 return value indicates an error occurred, and in this
case an error code is stored into the global variable
.Va errno .
.Sh ERRORS
-The following error codes may be set in
-.Va errno :
-.Bl -tag -width [EFAULT]
+.Fn gettimeofday
+and
+.Fn settimeofday
+will succeed unless:
+.Bl -tag -width Er
.It Bq Er EFAULT
An argument address referenced invalid memory.
+.El
+.Pp
+In addition,
+.Fn settimeofday
+may return the following error:
+.Bl -tag -width Er
.It Bq Er EPERM
A user other than the superuser attempted to set the time.
.El
@@ -124,6 +132,11 @@ A user other than the superuser attempted to set the time.
.Xr getitimer 2 ,
.Xr ctime 3 ,
.Xr time 3
+.Sh STANDARDS
+The
+.Fn gettimeofday
+function conforms to
+.St -p1003.1-2008 .
.Sh HISTORY
As predecessors of these functions, former system calls
.Fn time