]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwboot: Allow to mix positional arguments with option -b
authorPali Rohár <pali@kernel.org>
Mon, 7 Mar 2022 18:03:09 +0000 (19:03 +0100)
committerStefan Roese <sr@denx.de>
Mon, 14 Mar 2022 13:04:18 +0000 (14:04 +0100)
commit52af87cbcb23bbafcc370014dc2ec2d475e5448d
treefe468b85fa2272aa747af726c8448c6fa633c338
parent478a8fe0cd126326ef2e236a0601c2fa95d86532
tools: kwboot: Allow to mix positional arguments with option -b

Commit 8083af97baac ("tools: kwboot: Allow to use -b without image path as
the last getopt() option") broke usage of kwboot with following arguments:

  kwboot -t -B 115200 /dev/ttyUSB0 -b u-boot-spl.kwb

Fix parsing of option -b with optional argument again.

Fixes: 8083af97baac ("tools: kwboot: Allow to use -b without image path as the last getopt() option")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reported-by: Tony Dinh <mibodhi@gmail.com>
Tested-by: Tony Dinh <mibodhi at gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwboot.c