Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JI9q5-0008LK-2P for mharc-grub-devel@gnu.org; Thu, 24 Jan 2008 16:42:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JI9q3-0008Kc-IL for grub-devel@gnu.org; Thu, 24 Jan 2008 16:42:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JI9q2-0008Jy-1i for grub-devel@gnu.org; Thu, 24 Jan 2008 16:42:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JI9q1-0008Ju-UG for grub-devel@gnu.org; Thu, 24 Jan 2008 16:42:21 -0500 Received: from wa-out-1112.google.com ([209.85.146.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JI9q1-0000GS-8O for grub-devel@gnu.org; Thu, 24 Jan 2008 16:42:21 -0500 Received: by wa-out-1112.google.com with SMTP id k34so766554wah.10 for ; Thu, 24 Jan 2008 13:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=dTnK6ccdJ7fp+t6zula+a4QsVkwZMDG4vzkeN/HY+Ug=; b=GoCj4r2xGB0OBeVo1b4FLmP8/6OKqcSnnwP7KAb6yfDJelTLrhucE1BqA2Ml8cpRqLCUKsSiTBgxK/N3lGaWJKeZ6PB+f+vty6ycyfZ86vROMfJ42bmK93UxdUxPEUXlnUkzDmOkF2QmpFqomvrYi0u3nyo6m/j77x86W41nVPQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=HI6PH5YdB56rJi/2TkVMfjxEX8MdO7GQZTeLuHFP3I5HBaa1ks9/PZTHi8xbiO6h9qlXmnv55SEQqWkHyF2x6s7cii+ntpNhcA9LetdZ/jsmH0I4yVXzj2xURnNP1oEPrPnP5ZzpsAqNDfGYAp7C94Go7BLTU+YY+ECMVPlXlCA= Received: by 10.114.73.1 with SMTP id v1mr1387207waa.16.1201210939379; Thu, 24 Jan 2008 13:42:19 -0800 (PST) Received: by 10.114.254.10 with HTTP; Thu, 24 Jan 2008 13:42:19 -0800 (PST) Message-ID: <94a0ccbc0801241342h677d79devf4cdd8987a0c9921@mail.gmail.com> Date: Thu, 24 Jan 2008 21:42:19 +0000 From: "Oleg Strikov" To: grub-devel@gnu.org In-Reply-To: <4798fefb.04d2260a.2430.ffffbc6bSMTPIN_ADDED@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_42131_23186788.1201210939367" References: <4798fefb.04d2260a.2430.ffffbc6bSMTPIN_ADDED@mx.google.com> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: Grub-devel Digest, Vol 47, Issue 99 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2008 21:42:23 -0000 ------=_Part_42131_23186788.1201210939367 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > >> 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: > > >http://www.opengroup.org/onlinepubs/009695399/functions/errno.html > > >-- > >Regards, > >Pavel Roskin 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? ------=_Part_42131_23186788.1201210939367 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
>> 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:

>http://www.opengroup.org/onlinepubs/009695399/functions/errno.html

>--
>Regards,
>Pavel Roskin

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?

------=_Part_42131_23186788.1201210939367--