From: "Yoshinori K. Okuji" <okuji@enbug.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] dprintf implementation
Date: Thu, 24 Feb 2005 20:30:03 +0100 [thread overview]
Message-ID: <200502242030.04298.okuji@enbug.org> (raw)
In-Reply-To: <421D89FF.9010508@yahoo.fr>
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
next prev parent reply other threads:[~2005-02-24 20:12 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
2005-02-24 8:49 ` Aki Tossavainen
2005-02-24 19:30 ` Yoshinori K. Okuji [this message]
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=200502242030.04298.okuji@enbug.org \
--to=okuji@enbug.org \
--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.