From 59251a755cfaad16e37981cd8f3cfcb8d6974798 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Mon, 31 Mar 2025 15:53:12 -0500 Subject: [PATCH] scripts: dbgflags.py: Tweaked to accept lfs-prefixed prefixes So: $ ./scripts/dbgflags.py -l LFS_I Is equivalent to: $ ./scripts/dbgflags.py -l I This matches some of the implicit prefixing during name lookup: $ ./scripts/dbgflags.py LFS_I_SYNC $ ./scripts/dbgflags.py I_SYNC $ ./scripts/dbgflags.py SYNC --- scripts/dbgflags.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/dbgflags.py b/scripts/dbgflags.py index 5c8a745f..afa370d7 100755 --- a/scripts/dbgflags.py +++ b/scripts/dbgflags.py @@ -210,8 +210,13 @@ def main(flags, *, flags_ = [] prefix = set() for f in flags: + # accept prefix prefix if f.upper() in prefixes: prefix.update(prefixes[f.upper()]) + # accept LFS_+prefix prefix + elif (f.upper().startswith('LFS_') + and f.upper()[len('LFS_'):] in prefixes): + prefix.update(prefixes[f.upper()[len('LFS_'):]]) else: flags_.append(f)