This is a preparation for the coming sysfs support.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* @min_io_size: minimum input/output unit size
* @subpage_size: sub-page size
* @rdonly: non-zero if the device is read-only
- * @allows_bb: non-zero if the MTD device may have bad eraseblocks
+ * @bb_allowed: non-zero if the MTD device may have bad eraseblocks
*/
struct mtd_dev_info
{
int min_io_size;
int subpage_size;
unsigned int rdonly:1;
- unsigned int allows_bb:1;
+ unsigned int bb_allowed:1;
};
/**
goto out_close;
}
errno = 0;
- mtd->allows_bb = 0;
+ mtd->bb_allowed = 0;
} else
- mtd->allows_bb = 1;
+ mtd->bb_allowed = 1;
mtd->type = ui.type;
mtd->size = ui.size;
return -1;
}
- if (!mtd->allows_bb)
+ if (!mtd->bb_allowed)
return 0;
seek = (loff_t)eb * mtd->eb_size;
int ret;
loff_t seek;
- if (!mtd->allows_bb) {
+ if (!mtd->bb_allowed) {
errno = EINVAL;
return -1;
}
if (!args.quiet)
printf("\n");
- if (!mtd->allows_bb) {
+ if (!mtd->bb_allowed) {
if (!args.quiet)
printf("\n");
return errmsg("bad blocks not supported by this flash");