grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] dprintf implementation


From: Hollis Blanchard
Subject: Re: [PATCH] dprintf implementation
Date: Thu, 24 Feb 2005 18:18:41 -0600

On Feb 24, 2005, at 1:30 PM, Yoshinori K. Okuji wrote:

On Thursday 24 February 2005 09:02, Vincent Pelletier wrote:
Iirc there were differences of point of view on that matter.
Okuji, what do you think about that idea ?

What I said was that you should use strings instead of bit fields.
[...]
Here you don't have to use bit fields (such as DEBUG_MODE_FS_BIT) at
all. When dprintf is called, dprintf simply check if a specified
category is included in the variable "debug". Like this:

Ah ok, so the call would look like this:
        grub_dprintf("disk", "reading block %i", blockno);

Although that could lend itself to difficult-to-detect typos. Perhaps a #define would be useful after all:
        #define GRUB_DBG_DISK "disk"
        grub_dprintf(GRUB_DBG_DISK, "reading block %i", blockno);

Ah, I see Vincent's patch already does what's needed with the grub_dprintf macro, so it's just the conditional output he's working on in grub_real_dprintf. Sounds good. :)

-Hollis





reply via email to

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