From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org, Daniel Kiper <daniel.kiper@oracle.com>
Cc: Michael Schierl <schierlm@gmx.de>,
Glenn Washburn <development@efficientek.com>
Subject: [DEBUG 0/2] Disable debug conditionals
Date: Tue, 19 Oct 2021 01:47:01 -0500 [thread overview]
Message-ID: <cover.1634625674.git.development@efficientek.com> (raw)
Here are two patches I've found useful when debugging grub issues. The first
patch allows the the $debug variable to contain conditionals prefixed with a
'-' to selectively disable that conditional when all conditionals have been
enabled. Only the first occurance of the conditional in the debug variable is
checked. So a value of "all,btrfs,alloc,-btrfs" will not disable btrfs debug
messages. A better implementation would do a string search for the conditional
from the end of the debug string, but grub doesn't have a string method to
search from the end of the string currently. I think despite its limitations,
the current patch is useful enough to be included, until takes an interest
in upgrading it.
The second patch adds the conditional to the debug message prefix. This is
especially useful in the context of the first patch and a situation where the
user is debugging a boot issue in a live grub and doesn't have the source
readily available (they are in GRUB on a non-booting system!)
Glenn
Glenn Washburn (2):
misc: Allow selective disabling of debug conditionals
misc: Add debug log condition to log output
grub-core/kern/misc.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
--
2.27.0
next reply other threads:[~2021-10-19 6:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 6:47 Glenn Washburn [this message]
2021-10-19 6:47 ` [DEBUG 1/2] misc: Allow selective disabling of debug conditionals Glenn Washburn
2021-10-19 19:10 ` Michael Schierl
2021-10-19 20:45 ` Glenn Washburn
2021-10-21 18:28 ` Daniel Kiper
2021-10-19 6:47 ` [DEBUG 2/2] misc: Add debug log condition to log output Glenn Washburn
2021-10-20 14:53 ` Daniel Kiper
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=cover.1634625674.git.development@efficientek.com \
--to=development@efficientek.com \
--cc=daniel.kiper@oracle.com \
--cc=grub-devel@gnu.org \
--cc=schierlm@gmx.de \
/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.