[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] dprintf implementation
From: |
Yoshinori K. Okuji |
Subject: |
Re: [PATCH] dprintf implementation |
Date: |
Thu, 24 Feb 2005 20:30:03 +0100 |
User-agent: |
KMail/1.7.1 |
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.
# This enables the debug mode for fs and disk.
debug="fs disk"
...execute commands...
# This disable the debug mode.
debug=""
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:
enabled = 0;
if (grub_strstr (debug, "all"))
enabled = 1;
else if (grub_strstr (debug, category))
enabled = 1;
Actually, strstr is not appropriate, because it does not consider word
boundaries.
Strings are much better because of the flexibility.
Okuji
- [PATCH] dprintf implementation, Vincent Pelletier, 2005/02/21
- Re: [PATCH] dprintf implementation, Hollis Blanchard, 2005/02/23
- Re: [PATCH] dprintf implementation, Vincent Pelletier, 2005/02/24
- Re: [PATCH] dprintf implementation, Aki Tossavainen, 2005/02/24
- Re: [PATCH] dprintf implementation,
Yoshinori K. Okuji <=
- Re: [PATCH] dprintf implementation, Vincent Pelletier, 2005/02/24
- Re: [PATCH] dprintf implementation, Hollis Blanchard, 2005/02/24
- Re: [PATCH] dprintf implementation, Aki Tossavainen, 2005/02/25
- [PATCHv2] dprintf implementation, Vincent Pelletier, 2005/02/25
- Re: [PATCHv2] dprintf implementation, Hollis Blanchard, 2005/02/25
- Re: [PATCHv2] dprintf implementation, Aki Tossavainen, 2005/02/25
- Re: [PATCHv2] dprintf implementation, Hollis Blanchard, 2005/02/25
- Re: [PATCHv2] dprintf implementation, Yoshinori K. Okuji, 2005/02/25
- Re: [PATCHv2] dprintf implementation, Vincent Pelletier, 2005/02/25
- Re: [PATCHv2] dprintf implementation, Yoshinori K. Okuji, 2005/02/25