summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1997-01-08 12:02:15 +0000
committerjoerg <joerg@FreeBSD.org>1997-01-08 12:02:15 +0000
commit6ed07ccb5b543be02ab260ca6258877aae01e975 (patch)
tree2508ee7854edebe25f2a190cc2803697575ae13f /lib/libc
parent151ff8e003fe5636b084dd2b8474bb95c4af86f1 (diff)
downloadFreeBSD-src-6ed07ccb5b543be02ab260ca6258877aae01e975.zip
FreeBSD-src-6ed07ccb5b543be02ab260ca6258877aae01e975.tar.gz
Document the various reasons for EINVAL.
Document the flaw that `offset' is required to be page-aligned, in the BUGS section.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/mmap.232
1 files changed, 21 insertions, 11 deletions
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
index 3197397..a616a2c 100644
--- a/lib/libc/sys/mmap.2
+++ b/lib/libc/sys/mmap.2
@@ -180,20 +180,28 @@ was not open for writing.
.It Bq Er EBADF
.Fa Fd
is not a valid open file descriptor.
-.\".It Bq Er EINVAL
-.\"One of
-.\".Dv MAP_ANON
-.\"or
-.\".Dv MAP_FILE
-.\"was not specified as part of the
-.\".Fa flags
-.\"parameter.
+.It Bq Er EINVAL
.Dv MAP_FIXED
was specified and the
-.I addr
-parameter was not page aligned.
-.Fa Fd
+.Fa addr
+parameter was not page aligned, or part of the desired address space
+resides out of the valid address space for a user process.
+.It Bq Er EINVAL
+.Fa Len
+was negative.
+.It Bq Er EINVAL
+.Dv MAP_ANON
+was specified and the
+.Fa fd
+parameter was not -1.
+.It Bq Er EINVAL
+.Dv MAP_ANON
+has not been specified and
+.Fa fd
did not reference a regular or character special file.
+.It Bq Er EINVAL
+.Fa Offset
+was not page-aligned. (See BUGS below.)
.It Bq Er ENOMEM
.Dv MAP_FIXED
was specified and the
@@ -226,3 +234,5 @@ the filesystem code that causes the limit to be further restricted to
Another reason for the 2GB limit is that filesystem metadata can
reside at negative offsets.
+
+We currently can only deal with page aligned file offsets.
OpenPOWER on IntegriCloud