]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwboot: Allow to use -b without image path as the last getopt() option
authorPali Rohár <pali@kernel.org>
Mon, 7 Feb 2022 09:12:24 +0000 (10:12 +0100)
committerStefan Roese <sr@denx.de>
Thu, 10 Feb 2022 06:12:16 +0000 (07:12 +0100)
commit8083af97baacd0304ed6653a37d7d8904b6cc84d
treede5404b159169d5766ffbc8bc6741ba17aa8d01e
parent100d23768db468ca03e92fcb0c010c68ebdff4e6
tools: kwboot: Allow to use -b without image path as the last getopt() option

Currently it is possible to call "kwboot -b -t /dev/ttyUSB0" but not to
call "kwboot -b /dev/ttyUSB0".

Fix it by not trying to process the last argv[], which is non-getopt()
option (tty path) as the image path for -b.

Fixes: 7303f00ee80b ("tools: kwboot: Allow to use option -b without image path")
Reported-by: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marcel Ziswiler <marcel@ziswiler.com>
Tested-by: Marcel Ziswiler <marcel@ziswiler.com>
tools/kwboot.c