[Top][All Lists]

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

Re: /kern/file.c BUG

From: Marco Gerards
Subject: Re: /kern/file.c BUG
Date: Fri, 25 Jan 2008 09:45:26 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Pavel Roskin <address@hidden> writes:

> On Thu, 2008-01-24 at 20:08 +0200, Vesa Jääskeläinen wrote:
>> 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:

That just wouldn't work, it is not how the current code was designed.

For example when you open a file, first the filesystem type has to be
detected.  So first you try filesystem A, after that filesystem B,
etc.  A returns an error, B too, etc.  Some of these errors (out of
memory) should immediately be reported back to the caller.  Others,
like wrong filesystem type are normal.  We just clear the error and

It's like exception handling in C++.  You can choose which errors you
handle at a certain level.


reply via email to

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