On Wed, 05 Apr 2017 11:24:11 -0600, "Theo de Raadt" wrote:

> > "ls -l /dev/rsd0c; ls -l /dev/sd0c" shows that sd0c is a block device
> > and rsd0c is a character device, and mmap's man page says that
> > "character special files" are OK.
> 
> The manual pages will never list all restrictions.

In this case I think it makes sense to document it.

 - todd

Index: /usr/src/lib/libc/sys/mmap.2
===================================================================
RCS file: /cvs/src/lib/libc/sys/mmap.2,v
retrieving revision 1.54
diff -u -p -u -r1.54 mmap.2
--- /usr/src/lib/libc/sys/mmap.2        11 Mar 2017 22:58:46 -0000      1.54
+++ /usr/src/lib/libc/sys/mmap.2        5 Apr 2017 17:35:53 -0000
@@ -263,6 +263,10 @@ specified a region that would extend bey
 .Fa fd
 did not specify a regular, character special, or block special file.
 .It Bq Er EINVAL
+.Fa fd
+specified a character special or block special file and the underlying
+device does not support memory mapping.
+.It Bq Er EINVAL
 The allocation
 .Fa len
 was 0.

Reply via email to