aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.d/os_test.h
diff options
context:
space:
mode:
authorAlexander Goncharov <chat@joursoir.net>2023-03-02 15:23:20 +0400
committerAnastasia Klimchuk <aklm@chromium.org>2023-04-13 09:16:56 +0000
commitc61bbb1f9ff4456c0eb384a49e8a7a2b026cd234 (patch)
treebd2b4b24c4482a0be8ae9e8f686dda8c31ba3aa8 /Makefile.d/os_test.h
parentcb85aec5cec75e5750a1d846411d8a42bf1b9f7b (diff)
downloadflashrom-c61bbb1f9ff4456c0eb384a49e8a7a2b026cd234.tar.gz
flashrom-c61bbb1f9ff4456c0eb384a49e8a7a2b026cd234.tar.bz2
flashrom-c61bbb1f9ff4456c0eb384a49e8a7a2b026cd234.zip
cli_classic: refactor arguments parsing into separate func
Move variables that represent parsed options to `cli_options` structure. This patchset also introduces the following functions: - parse_options() which parses command line arguments and fills the structure. - free_options() that releases an allocated data from the structure. This is one of the steps on the way to simplify the main function by using helper functions with descriptive names. TOPIC=split_main_func TEST=the following scenarious run successfully ./flashrom -p dummy:emulate=S25FL128L -V ./flashrom -p dummy:size=8388608,emulate=VARIABLE_SIZE \ -r /tmp/dump.rom ./flashrom -p dummy:emulate=W25Q128FV -l /tmp/rom.layout \ -i boot -w /tmp/rom.tr.img ./flashrom -p dummy:emulate=W25Q128FV --wp-list ./flashrom -p dummy:emulate=W25Q128FV,hwwp=yes \ --wp-enable \ --wp-range=0x00c00000,0x00400000 \ --wp-status $ head -c 16MiB </dev/urandom >/tmp/image.rom ./flashrom -p dummy:image=/tmp/image.rom,emulate=S25FL128L \ -c S25FL128L -E -V Change-Id: Id573bc74e3bb46b7dc42f1452fff6394d4f091bc Signed-off-by: Alexander Goncharov <chat@joursoir.net> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66343 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'Makefile.d/os_test.h')
0 files changed, 0 insertions, 0 deletions