diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2014-07-02 22:22:36 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2014-07-02 22:22:36 +0000 |
commit | 4e551fee62618c29d4c0a8b5a1ed32d2cc052f88 (patch) | |
tree | 53e7b82a4cb1aa2fd7f5c541c3fa3aab2dda744f /lib/libc/sys/mmap.2 | |
parent | 1b43aead4d92b27611ed448f64b39af17bbeb87d (diff) |
Various small typographic fixes for mman.h manual pages:
Use .Fn instead of .Nm as appropriate
Use .In for include lines
Use .Rv -std where possible
Use .Xr to refer to functions from other manual pages
Remove extraneous sys/types.h include
More substantive changes to follow.
Discussed with schwarze
Diffstat (limited to 'lib/libc/sys/mmap.2')
-rw-r--r-- | lib/libc/sys/mmap.2 | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2 index 667d3e39eb9..a8696c8f716 100644 --- a/lib/libc/sys/mmap.2 +++ b/lib/libc/sys/mmap.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mmap.2,v 1.49 2014/07/02 19:08:40 matthew Exp $ +.\" $OpenBSD: mmap.2,v 1.50 2014/07/02 22:22:35 matthew Exp $ .\" $NetBSD: mmap.2,v 1.5 1995/06/24 10:48:59 cgd Exp $ .\" .\" Copyright (c) 1991, 1993 @@ -37,13 +37,12 @@ .Nm mmap .Nd map files or devices into memory .Sh SYNOPSIS -.Fd #include <sys/types.h> -.Fd #include <sys/mman.h> +.In sys/mman.h .Ft void * .Fn mmap "void *addr" "size_t len" "int prot" "int flags" "int fd" "off_t offset" .Sh DESCRIPTION The -.Nm mmap +.Fn mmap function causes the contents of .Fa fd , starting at @@ -77,7 +76,7 @@ The .Fa len argument describes the minimum amount of bytes the mapping will span. Since -.Nm +.Fn mmap maps pages into memory, .Fa len may be rounded up to hit a page boundary. @@ -203,24 +202,20 @@ function does not unmap pages; see .Xr munmap 2 for further information. .Sh RETURN VALUES -Upon successful completion, -.Nm mmap -returns a pointer to the mapped region. -Otherwise, a value of +The +.Fn mmap +function returns a pointer to the mapped region if successful; +otherwise the value .Dv MAP_FAILED -is returned and +is returned and the global variable .Va errno is set to indicate the error. -The symbol -.Dv MAP_FAILED -is defined in the header -.In sys/mman.h . A successful return from -.Nm +.Fn mmap will never return the value .Dv MAP_FAILED . .Sh ERRORS -.Nm +.Fn mmap will fail if: .Bl -tag -width Er .It Bq Er EACCES |