grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] dprintf implementation


From: Aki Tossavainen
Subject: Re: [PATCH] dprintf implementation
Date: Thu, 24 Feb 2005 10:49:41 +0200 (EET)

On Thu, 24 Feb 2005, Vincent Pelletier wrote:

> Hollis Blanchard wrote:
> > Your mailer did some bad stuff to this patch again...
>
> Argh. I wonder if it is because I sign my mails...
>
> > Weren't we going to have various flags to selectively enable debug
> > messages from particular components at runtime?
>
> Iirc there were differences of point of view on that matter.
> Okuji, what do you think about that idea ?
>
> What about something like :
> GRUB> DEBUG=D_PARTMAP|D_FS
> GRUB> DEBUG_OUTPUT=D_SCREEN
> GRUB> command_to_be_watched
> file.c,line (D_PARTMAP): Partmap of type 'foo' found.
> file2.c,line (D_FS): Superblock valid, fs 'bar'.
> [...]
>
> I see those points to be done :
> - define | operator
> - name-to-value conversion for constants (case-sensitive ?)
> - value-to-name conversion for constants
>
> What about modules ? It should be good to make them able to add new
> error constants (maybe only one per module ?) that would match their own
> dprintf.
>
> Here are some prototypes as I think of them:
> char *grub_debug_constants[sizeof(grub_debug_mask)*8];
> int grub_debug_constant_request (const char *name);
>    return value : -1 = no more available bit, -2 = duplicate name,
>    otherwise 1<<value would give the position of the bit in the mask.
>    That binary shift would be done by grub_dprintf. Checks for duplicate
>    name (again, case sensitive ?).
> void grub_dprintf (int value, char *format, ...);
>    "value" would be the one returned by grub_debug_constant_request.
> void grub_debug_constant_release (int value);
>
> Vincent Pelletier
>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>

Signing emails does damage to dashes. It's because consecutive dashes are
treated as signature boundary mark. It changes ---- to - ---.

Aki Tossavainen




reply via email to

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