cmd_sf: let "sf update" preserve the final part of the last sector
authorGerlando Falauto <gerlando.falauto@keymile.com>
Tue, 27 Aug 2013 13:43:57 +0000 (19:13 +0530)
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>
Tue, 27 Aug 2013 14:09:39 +0000 (19:39 +0530)
commitb95f958d7d06b3cd117647b29b288cf168aa2ee9
tree226a0664372a763bf9c8941debb3ff64b02e7916
parenta928a36ff91ba585310491f2d8c08ec2d30bc2b0
cmd_sf: let "sf update" preserve the final part of the last sector

Since "sf update" erases the last block as a whole, but only rewrites
the meaningful initial part of it, the rest would be left erased,
potentially erasing meaningful information.
So, as a safety measure, have it rewrite the original content.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
common/cmd_sf.c