Subject: Re: getdirentries(2): argument doesn't match
To: None <itojun@iijlab.net>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: tech-kern
Date: 10/03/2002 08:18:53
I fixed getdirentries(2) manpage to reflect reality, so there isn't
any inconsistency anymore.
Jaromir
itojun@iijlab.net wrote:
> >> it seems that signedness of getdirentries(2) does not meet up with
> >> document. does it make sense? found by checking openbsd commit log.
> >istm that by using a u_int instead of an int (they are both always the
> >same size, right?) you can eliminate the two tests you have to add if
> >you make it an int.
> >less code to debug, audit, etc...
>
> in some portion system call argument type matches documentation (int),
> and checks are made using typecast to u_int (by typecasting negative
> number check is omitted).
>
> in some portion system call argument type differs from documentation
> (u_int), and checks are omitted for negative numbers.
>
> in some portion system call argument type matches documentation,
> and explicit checks are made - if (x < 0 || x >= MAX) return EINVAL;
>
> i want to see some consistency.
>
> itojun
>
--
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow. Do not let this distract you.'' -=-