grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] suppress error message "/grub2/locale/en.mo.gz not found"


From: Michael Chang
Subject: Re: [PATCH] suppress error message "/grub2/locale/en.mo.gz not found"
Date: Wed, 26 Sep 2012 15:44:31 +0800

2012/9/26 Colin Watson <address@hidden>:
> On Tue, Sep 25, 2012 at 12:46:15PM +0800, Michael Chang wrote:
>> I agree with you. IMHO the problem is it's not emitted directly from
>> gettext module but from common underlying fs level, removing it would
>> lead to other message which is fatal be ignored as well.
>
> That's incorrect; the gettext module is perfectly able to disregard
> errors from lower-level methods that it doesn't care about.

I'd say I'm too careless in understanding how grub2 message logging. I
see grub_error(...) and think it was logged to screen immediately
after that function returns, which is completely wrong.

The error message and number are staging in the buffer and it's up to
the module to use grub_print_error (...) to flush all pending messages
to the screen.  Nevertheless you could stack errors with push|pop,
which is extremely useful as grub2 could be stacked by modules ..

Glad to know one more good and flexible design of grub2. :)

Thanks,
Michael

>
>> Another question is : Is there any other good method offered by grub2
>> to check the files existence that we could test before calling
>> grub_file_open() in gettext.c ? Anybody has good idea on this ?
>
> This is the wrong approach; you should try it and then handle errors,
> not look-before-you-leap.
>
> --
> Colin Watson                                       address@hidden
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
>



reply via email to

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