coreboot-kgpe-d16/util/cbfstool
Furquan Shaikh c42cf911ad 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>
2020-04-20 06:08:29 +00:00
..
console
flashmap util/*: more typo fixes 2020-01-30 13:47:49 +00:00
lz4 lz4: Fix out-of-bounds reads 2020-03-02 15:03:03 +00:00
lzma util/cbfstool/lzma: Make clang-11+'s indentation checker happy 2020-02-01 19:51:31 +00:00
EXAMPLE
Makefile cbfstool: Build vboot library 2020-03-23 08:34:23 +00:00
Makefile.inc cbfstool: Build vboot library 2020-03-23 08:34:23 +00:00
ProcessorBind.h
amdcompress.c
cbfs-mkpayload.c util/cbfstool: Fix typos 2020-01-30 13:01:00 +00:00
cbfs-mkstage.c commonlib: Add commonlib/bsd 2020-01-28 06:36:13 +00:00
cbfs-payload-linux.c
cbfs.h Remove MIPS architecture 2019-11-20 10:10:48 +00:00
cbfs_image.c util/cbfstool: Fix typos 2020-01-30 13:01:00 +00:00
cbfs_image.h util/cbfstool: Add optional argument ibb 2019-10-18 15:37:37 +00:00
cbfs_sections.c
cbfs_sections.h
cbfscomptool.c
cbfstool.c util/cbfstool: Allow use of non-ASCII longopt 2020-04-20 06:08:29 +00:00
coff.h
common.c
common.h
compress.c commonlib: Add commonlib/bsd 2020-01-28 06:36:13 +00:00
default-x86.fmd
default.fmd
description.md
elf.h util/*: more typo fixes 2020-01-30 13:47:49 +00:00
elfheaders.c util/cbfstool: Fix typos 2020-01-30 13:01:00 +00:00
elfparsing.h
fdt.h
fit.c util/cbfstool: Fix typos 2020-01-30 13:01:00 +00:00
fit.h
flashmap_tests.c
fmap_from_fmd.c
fmap_from_fmd.h
fmaptool.c lib/fmap: Add optional pre-RAM cache 2019-11-14 03:30:11 +00:00
fmd.c
fmd.h
fmd_parser.c_shipped
fmd_parser.h_shipped
fmd_parser.y
fmd_scanner.c_shipped
fmd_scanner.h_shipped
fmd_scanner.l
fv.h
ifittool.c util/cbfstool: Remove unused assignment 2019-08-20 15:20:30 +00:00
ifwitool.c util/cbfstool: Fix typos 2020-01-30 13:01:00 +00:00
linux.h
linux_trampoline.S
linux_trampoline.c
linux_trampoline.h
option.h
partitioned_file.c
partitioned_file.h
rmodtool.c
rmodule.c util/cbfstool: Fix typos 2020-01-30 13:01:00 +00:00
rmodule.h
swab.h
xdr.c