[Top][All Lists]

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

Re: Grub-devel Digest, Vol 47, Issue 99

From: Marco Gerards
Subject: Re: Grub-devel Digest, Vol 47, Issue 99
Date: Fri, 25 Jan 2008 09:53:23 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

"Oleg Strikov" <address@hidden> writes:

>> >> Previous behavior was working correctly. You have to handle
>> >> errorcodes
>> >> at some point and that means when error is handled it is zeroed (or
>> >> GRUB_ERR_NONE). So code is in callee where that loop was.
>> >I suggest that we never set grub_errno to 0 (except the initialization).
>> >That would match the standard errno behavior:
>> ><>
> But is it correct to check and handle  errno in some `library` function (now
> we do) ?  I CAN, but i do not have to examine  errno after each
> non-error-free call; is it right?

This documentation about errno does NOT match grub_errno, please keep
that in mind :-)

You should *always* check for errors.  *always* check if memory
allocation succeeded, etc.  If you write code that ignored errors, it
is broken.

A more explicit approach would be letting every function return


reply via email to

[Prev in Thread] Current Thread [Next in Thread]