}
/* Adjust a chip/partition size down for bad blocks so we don't
- * read/write/erase past the end of a chip/partition by accident.
+ * read/write past the end of a chip/partition by accident.
*/
static void adjust_size_for_badblocks(loff_t *size, loff_t offset, int dev)
{
int scrub = !strncmp(cmd, "scrub", 5);
int spread = 0;
int args = 2;
- int adjust_size = 0;
const char *scrub_warn =
"Warning: "
"scrub option will erase all factory set bad blocks!\n"
spread = 1;
} else if (!strcmp(&cmd[5], ".part")) {
args = 1;
- adjust_size = 1;
} else if (!strcmp(&cmd[5], ".chip")) {
args = 0;
- adjust_size = 1;
} else {
goto usage;
}
&maxsize) != 0)
return 1;
- /* size is unspecified */
- if (adjust_size && !scrub)
- adjust_size_for_badblocks(&size, off, dev);
-
nand = &nand_info[dev];
memset(&opts, 0, sizeof(opts));