fw_env: Add missing write failure check
authorAlex Kiernan <alex.kiernan@gmail.com>
Wed, 12 Jun 2019 14:27:55 +0000 (15:27 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 20 Jun 2019 14:57:08 +0000 (10:57 -0400)
commita762311a6cf02396977f59babdf945c226f4404f
tree01afc22415d38743798362a2c4069b784a452787
parent656d8da9d2862afd293ae678d37a486d34b76ca2
fw_env: Add missing write failure check

If flash_write fails, whilst we propagate this up to our caller, we need
to avoid swapping in the new file (if we're on a filesystem) in this
case.

Fixes: dbc34323796b ("tools: env: Implement atomic replace for filesystem")
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
tools/env/fw_env.c