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: Andrey Borzenkov
Subject: Re: [PATCH] suppress error message "/grub2/locale/en.mo.gz not found"
Date: Tue, 25 Sep 2012 22:52:24 +0400

В Вт., 25/09/2012 в 19:24 +0400, Andrey Borzenkov пишет:
> В Вт., 25/09/2012 в 12:46 +0800, Michael Chang пишет:
> > 2012/9/25 Andrey Borzenkov <address@hidden>:
> > > В Пн., 24/09/2012 в 11:37 +0200, Mads Kiilerich пишет:
> > >> On 09/24/2012 08:51 AM, Michael Chang wrote:
> > >> > We don't insert gettext module if message catalog file missing to
> > >> > prevent error message from being logged.
> [...]
> > >
> > > What about removing this error message altogether? Under OS gettext does
> > > not complaint when catalog does not exist; why should it do it here?
> > > Having English interface is enough indication that message catalog was
> > > not found.
> > 
> > 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.
> > 
> 
> As far as I can tell it is emitted explicitly when setting "lang":
> 
> grub-core/gettext/gettext.c:grub_gettext_env_write_lang()
> 
>   grub_err_t err;
>   err = grub_gettext_init_ext (&main_context, val, grub_env_get
> ("locale_dir"),
>                                grub_env_get ("prefix"));
>   if (err)
>     grub_print_error ();
> 
> and later. There are some more places which also try to reload catalog.
> 

Attached is prototype patch (tested) which suppresses error return from
grub_text_init_ext(). Proper patch would need to also change function
prototype, as its return value is now useless.

> May be this messages can be turned into debugging message instead of
> error.
> 

That I do not know how to do.

Attachment: grub2-no-error-on-missing-message-catalog.patch
Description: Text Data


reply via email to

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