[PATCH 2/6] ARM: am33xx update SPI NOR: Ask use before flashing
Sascha Hauer
s.hauer at pengutronix.de
Tue Sep 30 06:10:28 PDT 2014
Let the user confirm the update process before flashing the new
image.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/mach-omap/am33xx_bbu_spi_mlo.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c b/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
index c979302..97dc54e 100644
--- a/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
+++ b/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
@@ -59,6 +59,10 @@ static int spi_nor_mlo_handler(struct bbu_handler *handler,
return -ENOSPC;
}
+ ret = bbu_confirm(data);
+ if (ret != 0)
+ return ret;
+
dstfd = open(data->devicefile, O_WRONLY);
if (dstfd < 0) {
printf("could not open %s: %s", data->devicefile, errno_str());
--
2.1.0
More information about the barebox
mailing list