scripts: tracebd.py/dbgbmap.py: Made off range a subparser of block range

So:

- before: ./scripts/dbgbmap.py disk -b4096 -@0 -n16,32
- after:  ./scripts/dbgbmap.py disk -b4096 -@'0 -n16,32'

This is mainly to avoid the naming conflict between -n/--size and
-n/--lines, while also separating out the namespaces a bit.

It's probably not the most intuitive CLI UI, but --off and -n/--size are
probably infrequent arguments at this level of script anyways.
This commit is contained in:
Christopher Haster
2025-03-14 17:52:02 -05:00
parent e18cecc3fb
commit 9b03933f2d
4 changed files with 56 additions and 16 deletions

View File

@@ -1479,6 +1479,7 @@ if __name__ == "__main__":
def parse(value):
import copy
subparser = copy.deepcopy(parser)
subparser.prog = "%s --subplot" % parser.prog
next(a for a in subparser._actions
if '--output' in a.option_strings).required = False
next(a for a in subparser._actions