grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] kern/err.c + disk/raid.c error handling fixes


From: Felix Zielcke
Subject: Re: [PATCH] kern/err.c + disk/raid.c error handling fixes
Date: Thu, 14 Aug 2008 13:02:30 +0200

Am Donnerstag, den 14.08.2008, 09:13 +0200 schrieb Marco Gerards: 
> So this patch isn't really required, but you want it for Lenny?

address@hidden
That's the one Robert and me thought could be something for lenny.

I have forgotten to merge the disk/raid.c changes which Robert wanted to
have in the last grub_print_error () patches.

As I already told you on IRC, I now start to believe like Robert that
the idea isn't that bad to have a function for the utils which prints to
stderr but it doestn't `exit ()' liek grub_util_error does.

Maybe not only raid.mod has a use for this but others too.

> > 2008-08-14  Felix Zielcke  <address@hidden>
> >
> >         * include/grub/err.h (grub_error_stack_assert): New variable
> >         declaration.
> >         * kern/err.c (grub_error_stack_assert): Remove static.
> >         (grub_print_error): Disable it for [GRUB_UTIL] because ...
> >         * util/err.c: New file with grub_print_error () using fprintf 
> >         (stderr, ...).
> 
> Can you just use misc.c?

As already said on IRC
address@hidden

grub-mkimage would then need to have kern/err.c included.

> 
> >         * conf/common.rmk: Add it for grub-probe.
> 
> 
> I have been thinking of an alternative way to fix this.  A bit of a
> compromise between what you want and what I want and perhaps cleaner.

This whole problem, confuses me now myself.
Bean is rewriting the whole RAID code anyway and Robert and me would
like to have a simple and small patch for lenny.

For upstream (i.e. you ;)) I want a clean solution, that's why I did now
the RFC topic.
Maybe it's just better if I don't think now for lenny.

> You could define a function grub_err_printf or something like that.
> Which you use in grub_print_error.  You can redefine it for
> GRUB_UTIL to grub_util_error and to grub_print otherwise.
> 
> I didn't study the code.  Will this be easier and cleaner?


Thanks to Robert for the hint with the copyright years.

As always with me, changelog and code is probable still not perfect ;)
but I think the genereal idea behind it is a step to come nearer to a
clean good solution for this whole problem
(address@hidden)

It does compile cleanly i.e. doestn't introduce any warnings at all and
it works with the 2 raid/disk.c changes from msgid I said at the
beginning of this mail.

2008-08-14  Felix Zielcke  <address@hidden>

        * include/grub.err.h (grub_err_printf): New function prototype.
        * util/misc.c (grub_err_printf): New function.
        * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
        grub_printf.
        * kern/err.c (grub_print_error): Use grub_err_printf.

Attachment: util_err_2.diff
Description: Text Data


reply via email to

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