Pavel Roskin <[EMAIL PROTECTED]> 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: > > http://www.opengroup.org/onlinepubs/009695399/functions/errno.html
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 continue. It's like exception handling in C++. You can choose which errors you handle at a certain level. -- Marco _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel