Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/uvm



On Fri May 11 2007 at 21:02:04 +0000, Christos Zoulas wrote:
> >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.

Well, it's the null problem, both approaches are correct.  But I was
actually bitten by this just this week.  I thought my mapping succeeded
and was looking for the error in the completely wrong place.  In reality
my mapping had only "succeeded" because of len 0, where len 0 was due
to the actual bug.

But that's not to say something historic might not rely on len==0 =>
success.

-- 
Antti Kantee <pooka%iki.fi@localhost>                     Of course he runs 
NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
    "la qualité la plus indispensable du cuisinier est l'exactitude"



Home | Main Index | Thread Index | Old Index