]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwboot: Check whether baudrate was set to requested value
authorMarek Behún <marek.behun@nic.cz>
Fri, 24 Sep 2021 21:07:07 +0000 (23:07 +0200)
committerStefan Roese <sr@denx.de>
Fri, 1 Oct 2021 09:07:13 +0000 (11:07 +0200)
commita34b5da5508624c7574440aff61da873cc05d7bb
tree6e0a38737770af1451084464cf6b645fbe2c2f16
parent9e49fe2d4649e9278d4b3d1f65e86fa41b09cb61
tools: kwboot: Check whether baudrate was set to requested value

The tcsetattr() function can return 0 even if baudrate was not changed.
Check whether baudrate was changed to requested value, and in case of
arbitrary baudrate, check whether the set value is within 3% tolerance.

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