From 3821789421bd165d6c8fee1274502f5d07a3972c Mon Sep 17 00:00:00 2001 From: millert Date: Wed, 5 Apr 2017 18:15:43 +0000 Subject: [PATCH] Not all devices support mmap, document EINVAL in this case too. OK deraadt@ --- lib/libc/sys/mmap.2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2 index b37f99d7cc0..51094a46967 100644 --- a/lib/libc/sys/mmap.2 +++ b/lib/libc/sys/mmap.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mmap.2,v 1.54 2017/03/11 22:58:46 jmc Exp $ +.\" $OpenBSD: mmap.2,v 1.55 2017/04/05 18:15:43 millert Exp $ .\" $NetBSD: mmap.2,v 1.5 1995/06/24 10:48:59 cgd Exp $ .\" .\" Copyright (c) 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)mmap.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: March 11 2017 $ +.Dd $Mdocdate: April 5 2017 $ .Dt MMAP 2 .Os .Sh NAME @@ -263,6 +263,10 @@ specified a region that would extend beyond the end of the address space. .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. -- 2.20.1