All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Pelletier <subdino2004@yahoo.fr>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] dprintf implementation
Date: Thu, 24 Feb 2005 09:02:07 +0100	[thread overview]
Message-ID: <421D89FF.9010508@yahoo.fr> (raw)
In-Reply-To: <4ecefea8af9852b4ed0a0b046d73e9ee@penguinppc.org>

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





  reply	other threads:[~2005-02-24  8:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-21 21:04 [PATCH] dprintf implementation Vincent Pelletier
2005-02-23 23:11 ` Hollis Blanchard
2005-02-24  8:02   ` Vincent Pelletier [this message]
2005-02-24  8:49     ` Aki Tossavainen
2005-02-24 19:30     ` Yoshinori K. Okuji
2005-02-24 22:42       ` Vincent Pelletier
2005-02-25  0:18       ` Hollis Blanchard
2005-02-25  7:14         ` Aki Tossavainen
2005-02-25 11:52           ` [PATCHv2] " Vincent Pelletier
2005-02-25 16:02             ` Hollis Blanchard
2005-02-25 16:13               ` Aki Tossavainen
2005-02-25 16:41                 ` Hollis Blanchard
2005-02-25 17:12               ` Yoshinori K. Okuji
2005-02-25 18:04                 ` Vincent Pelletier
2005-02-25 18:58                   ` Yoshinori K. Okuji
2005-04-14  3:31                 ` Hollis Blanchard
2005-04-14  7:13                   ` Vincent Pelletier
2005-04-14 14:08                     ` Vincent Pelletier
2005-05-09  2:06                       ` Hollis Blanchard
2005-04-14 11:37                   ` Yoshinori K. Okuji

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=421D89FF.9010508@yahoo.fr \
    --to=subdino2004@yahoo.fr \
    --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.