This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: Patch to handle NULL dirp argument to readdir_r
- From: Andrew Lunn <andrew at lunn dot ch>
- To: sandeep kumar <sandeep at codito dot com>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Sun, 21 Dec 2003 11:12:40 +0100
- Subject: Re: Patch to handle NULL dirp argument to readdir_r
- References: <019a01c3c6ee$f7394eb0$2564a8c0@blackmagic>
On Sat, Dec 20, 2003 at 05:16:53PM +0530, sandeep kumar wrote:
> Changelog :
> * src/dir.cxx (readdir_r): Handle NULL dirp argument and return EINVAL.
>
> Choice of return value as EINVAL/ENOTDIR/EBADF . If you find EINVAL
> is not the right error code to return, please change that.
Thanks for the patch.
I checked the POSIX standard. It say that EBADF should be returned, so
i made the appropriate change.
Andrew