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
This commit is contained in:
Christopher Haster
2025-03-31 15:53:12 -05:00
parent 270230a833
commit 59251a755c

View File

@@ -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)