//usage: "[-o] [-b] [-s ADDR] [-f FILE] MTD_DEVICE"
//usage:#define nanddump_full_usage "\n\n"
//usage: "Dump the specified MTD device\n"
-//usage: "\n -o Omit oob data"
+//usage: "\n -o Dump oob data"
//usage: "\n -b Omit bad block from the dump"
//usage: "\n -s ADDR Start address"
//usage: "\n -l LEN Length"
/* bad block(s), advance mtdoffset */
if (IS_NANDDUMP && !(opts & OPT_b)) {
int bad_len = MIN(tmp, end_addr) - mtdoffset;
- dump_bad(&meminfo, bad_len, !(opts & OPT_o));
+ dump_bad(&meminfo, bad_len, opts & OPT_o);
}
mtdoffset = tmp;
}
printf("Writing at 0x%08x\n", mtdoffset);
else if (mtdoffset > blockstart && !(opts & OPT_b)) {
int bad_len = MIN(mtdoffset, limit) - blockstart;
- dump_bad(&meminfo, bad_len, !(opts & OPT_o));
+ dump_bad(&meminfo, bad_len, opts & OPT_o);
}
if (mtdoffset >= limit)
break;
}
xwrite(output_fd, filebuf, meminfo_writesize);
- if (IS_NANDDUMP && !(opts & OPT_o)) {
+ if (IS_NANDDUMP && (opts & OPT_o)) {
/* Dump OOB data */
oob.start = mtdoffset;
xioctl(fd, MEMREADOOB, &oob);