From: Andrey Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] gfxterm: check elements' properties and hadle errors.
Date: Wed, 6 Mar 2013 22:05:55 +0400 [thread overview]
Message-ID: <20130306220555.59cfa00a@opensuse.site> (raw)
In-Reply-To: <3230726.ejrxcKfAuV@icedphoenix>
В Mon, 04 Mar 2013 15:27:51 +0400
Vladimir Testov <vladimir.testov@rosalab.ru> пишет:
> GRUB does not show errors about non-existing properties or wrong values.
> property name and error hadling works only for global properties
>
> This patch fixes this misbehavior.
>
I find diff -p... generally more readable by providing context around
changes. May be my personal preference.
> --- grub-2.00/grub-core/gfxmenu/theme_loader.c 2012-02-24 14:19:45.000000000 +0400
> +++ grub-patch/grub-core/gfxmenu/theme_loader.c 2013-03-04 15:01:36.112753989 +0400
> @@ -557,7 +557,16 @@
> parse_proportional_spec (value, &component->h, &component->hfrac);
> else
> /* General property handling. */
> - component->ops->set_property (component, property, value);
> + {
> + grub_err_t error = component->ops->set_property (component, property, value);
> + if (error != GRUB_ERR_NONE)
> + {
> + grub_error (GRUB_ERR_IO,
> + "%s:%d:%d unknown property or wrong value `%s'=`%s'",
> + p->filename, p->line_num, p->col_num,
> + property, value);
> + }
> + }
This loses original OOM error if it was returned. May be make it return
true/false and check if grub_errno is set on false. Not sure.
Do you have any real problem to solve? I wonder if these errors are
visible to user at all; if not, setting them does not really buy
anything.
next prev parent reply other threads:[~2013-03-06 19:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 11:27 [PATCH] gfxterm: check elements' properties and hadle errors Vladimir Testov
2013-03-06 18:05 ` Andrey Borzenkov [this message]
2013-03-07 7:31 ` Vladimir 'φ-coder/phcoder' Serbinenko
-- strict thread matches above, loose matches on Subject: below --
2013-03-07 4:22 Vladimir Testov
2013-03-07 6:03 ` Andrey Borzenkov
2013-03-07 6:29 Vladimir Testov
2013-03-07 7:46 Vladimir Testov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130306220555.59cfa00a@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.