On Sat, Oct 06, 2012 at 09:40:23PM +0200, Dawe wrote:
> I think this information is already given in the sentences before.
> 
> Index: mmap.2
> ===================================================================
> RCS file: /cvs/src/lib/libc/sys/mmap.2,v
> retrieving revision 1.39
> diff -u -p -u -p -r1.39 mmap.2
> --- mmap.2    12 Apr 2012 12:53:27 -0000      1.39
> +++ mmap.2    6 Oct 2012 19:35:32 -0000
> @@ -188,10 +188,6 @@ The symbol
>  .Dv MAP_FAILED
>  is defined in the header
>  .Ao Pa sys/mman.h Ac .
> -No successful return from
> -.Fn mmap
> -will return the value
> -.Dv MAP_FAILED .
>  .Sh ERRORS
>  .Fn mmap
>  will fail if:
> 

philip guenther replied to this:

        No, it isn't.  The previous sentences say that MAP_FAILED
        is returned on error; this one says that MAP_FAILED is
        *only* returned on error.  Contrast this to strtoul(), where
        ULONG_MAX is returned on error, but can also be returned
        on success, meaning you have to do extra steps (clear errno
        before, test it afterwards) to detect failure.  This sentence
        is the one that makes it clear that that isn't the case
        with mmap().

i have to say, i didn;t get that. after discussing it a bit i've come to
see there is an ambiguity in the sentence being proposed for removal - it
can be read two ways.

with that in mind i propose to commit the diff below very shortly.
(the Fn -> Nm is just by the by)

jmc

Index: mmap.2
===================================================================
RCS file: /cvs/src/lib/libc/sys/mmap.2,v
retrieving revision 1.39
diff -u -r1.39 mmap.2
--- mmap.2      12 Apr 2012 12:53:27 -0000      1.39
+++ mmap.2      16 Oct 2012 20:55:08 -0000
@@ -188,12 +188,12 @@
 .Dv MAP_FAILED
 is defined in the header
 .Ao Pa sys/mman.h Ac .
-No successful return from
-.Fn mmap
-will return the value
+A successful return from
+.Nm
+will never return the value
 .Dv MAP_FAILED .
 .Sh ERRORS
-.Fn mmap
+.Nm
 will fail if:
 .Bl -tag -width Er
 .It Bq Er EACCES

Reply via email to