[PATCH 1/8] cfi flash driver: check for ctrl-c during erase
Sascha Hauer
s.hauer at pengutronix.de
Mon Dec 20 04:53:44 EST 2010
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/nor/cfi_flash.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/nor/cfi_flash.c b/drivers/nor/cfi_flash.c
index 2fa2c6b..d190e35 100644
--- a/drivers/nor/cfi_flash.c
+++ b/drivers/nor/cfi_flash.c
@@ -498,6 +498,11 @@ static int __cfi_erase(struct cdev *cdev, size_t count, unsigned long offset,
if (ret)
goto out;
+ if (ctrlc()) {
+ ret = -EINTR;
+ goto out;
+ }
+
if (verbose)
show_progress(i - start);
}
--
1.7.2.3
More information about the barebox
mailing list