]> git.ipfire.org Git - thirdparty/grub.git/commit
kern/misc: Allow selective disabling of debug facility names
authorGlenn Washburn <development@efficientek.com>
Sun, 2 Jan 2022 05:02:59 +0000 (23:02 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 7 Feb 2022 19:29:18 +0000 (20:29 +0100)
commitfcf2594ca12777ffd717819663e1c4b3d737c928
tree079ddf9a7d8b8448d9b4d45783df7937b1ec35c9
parent980cffdbb0dfbeafd32119a74c55fae9919e9039
kern/misc: Allow selective disabling of debug facility names

Sometimes you only know which debug logging facility names you want to
turn off, not necessarily all the ones you want enabled. This patch allows
the debug string to contain facility names in the $debug variable which are
prefixed with a "-" to disable debug log messages for that conditional. Say
you want all debug logging on except for btrfs and scripting, then do:
"set debug=all,-btrfs,-scripting"

Note, that only the last occurrence of the facility name with or without a
leading "-" is considered. So simply appending ",-facilityname" to the
$debug variable will disable that conditional. To illustrate, the command
"set debug=all,-btrfs,-scripting,btrfs" will enable btrfs.

Also, add documentation explaining this new behavior.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
docs/grub.texi
grub-core/kern/misc.c