forked from Imagelibrary/littlefs
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user