[syslinux] [PATCH 4/5] COM32: add trivial stat() function

Gene Cumm gene.cumm at gmail.com
Thu Mar 5 13:40:53 PST 2009


On Thu, Mar 5, 2009 at 2:10 PM, Jeffrey Hutzelman <jhutz at cmu.edu> wrote:
> --On Wednesday, March 04, 2009 09:23:35 PM -0500 Gene Cumm
> <gene.cumm at gmail.com> wrote:
>
>> 2-- I set errno to zero as it may contain an error I want to ignore
>> but you do have a good point.  opendir() will set errno as it needs.
>
> I'm not sure what you did with your opendir interface, but traditionally,
> UNIX system call interfaces do not set errno to 0 on success.  The only way
> to determine whether a call succeeded it to look at its return value; errno
> is only set to provide additional information if the call failed.

I fixed that already but haven't submitted a patch (in the works.
hopefully later tonight.).  Started digging around a little and found
that a library function should not set errno = 0 as it is a producer
of errno and never a consumer.  (Ooops).

-- 
-Gene




More information about the Syslinux mailing list