--- a/nanddump.c	2009-08-04 16:54:03.000000000 -0700
+++ b/nanddump.c	2009-08-04 17:49:20.000000000 -0700
@@ -83,6 +83,7 @@ static const char	*mtddev;		// mtd devic
 static const char	*dumpfile;		// dump file name
 static bool		omitbad = false;
 static bool		quiet = false;		// suppress diagnostic output
+static bool     skipbad = false;
 
 static void process_options (int argc, char * const argv[])
 {
@@ -90,7 +91,7 @@ static void process_options (int argc, c
 
 	for (;;) {
 		int option_index = 0;
-		static const char *short_options = "bs:f:il:opqn";
+		static const char *short_options = "bs:f:il:opqnm";
 		static const struct option long_options[] = {
 			{"help", no_argument, 0, 0},
 			{"version", no_argument, 0, 0},
@@ -153,6 +154,9 @@ static void process_options (int argc, c
 			case 'n':
 				noecc = true;
 				break;
+			case 'm':
+				skipbad = true;
+				break;
 			case '?':
 				error++;
 				break;
@@ -298,6 +302,12 @@ int main(int argc, char * const argv[])
 				perror("ioctl(MEMGETBADBLOCK)");
 				goto closeall;
 			}
+			if (badblock && skipbad) {
+				fprintf(stderr, "skipping bad block\n");
+				end_addr += meminfo.erasesize;
+				ofs += meminfo.erasesize - bs;
+				continue;
+			}
 		}
 
 		if (badblock) {
