]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwboot: Refactor and fix writing buffer
authorMarek Behún <marek.behun@nic.cz>
Fri, 24 Sep 2021 21:06:41 +0000 (23:06 +0200)
committerStefan Roese <sr@denx.de>
Fri, 1 Oct 2021 09:07:13 +0000 (11:07 +0200)
commit84dba3b81e84bd76f248bbaedaf59aeabda4a790
tree514185230a0d70a9a7aed06c32061fde16e59e0b
parent17a282a65ec677b1ddf86e22f7f3c165f0b4bcb3
tools: kwboot: Refactor and fix writing buffer

There are 3 instances in kwboot.c where we need to write() a given
buffer whole (iteratively writing until all data are written), and 2 of
those instances are wrong, for they do not increment the buffer pointer.

Refactor the code into a new function kwboot_write() where it is fixed.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwboot.c