Subject: Re: CVS commit: src/sys/uvm
To: None <source-changes@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: source-changes
Date: 05/11/2007 21:02:04
In article <20070511205358.GE5668@cs.hut.fi>,
Antti Kantee  <pooka@cs.hut.fi> wrote:
>On Fri May 11 2007 at 20:41:14 +0000, Christos Zoulas wrote:
>> 
>> Module Name:	src
>> Committed By:	christos
>> Date:		Fri May 11 20:41:14 UTC 2007
>> 
>> Modified Files:
>> 	src/sys/uvm: uvm_mmap.c
>> 
>> Log Message:
>> Improve on previous and write a RANGE_TEST macro and do it on all the
>> system calls instead of doing a half-assed job on some of them and none
>> on others.
>
>Heh, you'll love this.  According to SUS, munmap() should not return
>EOVERFLOW but EINVAL if addr+len wraps ;)
>(I guess there's no reason to cry over this, though)

I read about it too, and decided that it makes more sense for all
memory related system calls to return the same error codes for the
same error conditions.

>On a related note, SUS says that len==0 should return EINVAL, not succeed
>with no action like our code does.  Is this emulating some prehistoric
>behaviour?

For some calls 0 is an error, for others it is ok. I don't know the
rationale behind it. I'd say let's leave it alone for now.

christos