mirror of
https://github.com/opnsense/src.git
synced 2026-04-25 16:18:54 -04:00
Add RETURN VALUES and ERRORS sections.
This commit is contained in:
parent
bf67a4237e
commit
5a547a7217
1 changed files with 28 additions and 3 deletions
|
|
@ -40,6 +40,7 @@
|
|||
.Sh SYNOPSIS
|
||||
.Fd #include <sys/types.h>
|
||||
.Fd #include <sys/mman.h>
|
||||
.Ft int
|
||||
.Fn mprotect "caddr_t addr" "size_t len" "int prot"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
|
|
@ -49,11 +50,35 @@ changes the specified pages to have protection
|
|||
.Fa prot .
|
||||
Not all implementations will guarantee protection on a page basis;
|
||||
the granularity of protection changes may be as large as an entire region.
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion,
|
||||
.Fn mprotect
|
||||
returns 0. Otherwise a value of -1 is returned
|
||||
and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
The
|
||||
.Fn mprotect
|
||||
function will fail if:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EINVAL
|
||||
The virtual address range specified by the
|
||||
.Fa addr
|
||||
and
|
||||
.Fa len
|
||||
arguments is not valid.
|
||||
.It Bq Er EACCES
|
||||
The calling process was not allowed to change
|
||||
the protection to the value specified by
|
||||
the
|
||||
.Fa prot
|
||||
argument.
|
||||
.Sh SEE ALSO
|
||||
.Xr msync 2 ,
|
||||
.Xr munmap 2 ,
|
||||
.Xr madvise 2 ,
|
||||
.Xr mincore 2
|
||||
.Xr mincore 2 ,
|
||||
.Xr msync 2 ,
|
||||
.Xr munmap 2
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Fn mprotect
|
||||
|
|
|
|||
Loading…
Reference in a new issue