summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-08-10 17:22:53 +0800
committerDavid Woodhouse <dwmw2@infradead.org>2007-08-10 17:22:53 +0800
commit96daeacf50668871a5fc4f7dc2cc9237f7035f03 (patch)
tree835c3dcd387863d4984d678ec1115a5c546f29ae
parent8d0bce22e9d657bd916c69516fde6c8f2fd2433a (diff)
Mark blocks bad on failed write; don't abort.
-rw-r--r--nandtest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nandtest.c b/nandtest.c
index f0cbf85..35766d8 100644
--- a/nandtest.c
+++ b/nandtest.c
@@ -112,7 +112,8 @@ int main(int argc, char **argv)
if (len < 0) {
printf("\n");
perror("write");
- exit(1);
+ ioctl(fd, MEMSETBADBLOCK, &ofs);
+ continue;
}
if (len < meminfo.erasesize) {
printf("\n");