tools: fw_env: Fix warning when reading too little
authorHarald Seiler <hws@denx.de>
Thu, 28 May 2020 15:54:45 +0000 (17:54 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 2 Jun 2020 17:06:14 +0000 (13:06 -0400)
commit50bb682c5cc52769e7cbd835a00dbcbc75a4f0e7
tree944af99afe1442b42cf68a845900994231d3bdd6
parent95712afc17bb4141e7f902983fb27e5bbc5aa62f
tools: fw_env: Fix warning when reading too little

When using CONFIG_ENV_IS_IN_FAT and the config-file specifies a size
larger than what U-Boot wrote into the env-file, a confusing error
message is shown:

    $ fw_printenv
    Read error on /boot/uboot.env: Success

Fix this by showing a different error message when read returns too
little data.

Signed-off-by: Harald Seiler <hws@denx.de>
tools/env/fw_env.c