Attention is currently required from: laforge, pespin. Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/19422
to look at the new patch set (#5).
Change subject: vty: Allow using hex representations in cmd numeric ranges ......................................................................
vty: Allow using hex representations in cmd numeric ranges
Ranges can now be specified in hexadecimal range. In this case, only hexadecimal values are accepted (prefixed with "0x").
In order to allow using a hexadecimal value as an input argument, the command must specify the range in hexadecimal form. This way all existing commands (decimal) won't get an hexadecimal value unless they are further extended in the future, avoiding hard to notice breakage due to use of stroul() without using base=0 or even worse, using atoi() directly (which only understands decimal and provides no error checking mechanism).
A command argument can be expanded to accept both decimal and hex in a range by means of specifying both, example: "mycmd (<0-255>|<0x0-0xff>)".
Related: OS#5631 Change-Id: Ia2b7fbbf5502c28374c21dbff548232680da27d4 --- M src/vty/command.c M tests/vty/vty_test.c M tests/vty/vty_test.err M tests/vty/vty_test.ok 4 files changed, 178 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/22/19422/5