diff options
author | Furquan Shaikh <furquan@google.com> | 2020-04-14 00:14:44 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-04-20 06:08:29 +0000 |
commit | c42cf911ad787364aea359deb7c5a1c24f9bdd35 (patch) | |
tree | 7ab5e79394220424e61d4a7b619c2df3cf8360f8 /src/include/timestamp.h | |
parent | 8e66b23b350e59601c8e9201c121f484856487bb (diff) |
util/cbfstool: Allow use of non-ASCII longopt
CB:29744 ("util/cbfstool: Add optional argument ibb") added support
for non-ASCII characters for long_options. However, there is a check
later on which errors out since this character is not one of the
commands[i].optstring.
This change adds a function valid_opt() which does the following
things:
1. Checks if the returned optchar is among the list of optstring
supported by the command.
2. Checks if the returned optchar is a valid non-ASCII
option. Currently, we do not maintain a list of non-ASCII options
supported by each command. So, this function returns true if the
optchar returned by getopt_long falls within the allowed range.
Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: I27a4f9af9850e4c892573202904fa9e5fbb64df6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40375
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/include/timestamp.h')
0 files changed, 0 insertions, 0 deletions