[PATCH 7/8] nandwrite: add check for negative blockalign
Brian Norris
computersforpeace at gmail.com
Mon Nov 29 03:02:01 EST 2010
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
nandwrite.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/nandwrite.c b/nandwrite.c
index 5373a89..c409878 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -218,6 +218,10 @@ static void process_options(int argc, char * const argv[])
exit(EXIT_FAILURE);
}
+ if (blockalign < 0)
+ errmsg_die("Can't specify a negative blockalign '%d'",
+ blockalign);
+
argc -= optind;
argv += optind;
--
1.7.0.4
More information about the linux-mtd
mailing list