diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-12-20 13:00:10 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-12-20 15:04:30 +0100 |
commit | d7fe5e2263ae24df5938c220b62029f6131543a1 (patch) | |
tree | 8de1764a1eabe2529adae2ba82e90d32d64c1677 /lib | |
parent | 080a4e9c9b43d0a1cda7726bf14a828d4eff3b01 (diff) | |
download | barebox-d7fe5e2263ae24df5938c220b62029f6131543a1.tar.gz barebox-d7fe5e2263ae24df5938c220b62029f6131543a1.tar.xz |
mtd: Add subpagesize to mtd_info_user
ubiformat needs the subpagesize to work correctly. The kernel uses
sysfs to pass the subpagesize, but in barebox we have the possibility
to extend struct mtd_info_user. Add a corresponding field and use it
in ubiformat.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libmtd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libmtd.c b/lib/libmtd.c index eecc760548..1606b872fd 100644 --- a/lib/libmtd.c +++ b/lib/libmtd.c @@ -308,6 +308,7 @@ int mtd_get_dev_info(const char *node, struct mtd_dev_info *mtd) mtd->eb_size = ui.erasesize; mtd->min_io_size = ui.writesize; mtd->oob_size = ui.oobsize; + mtd->subpage_size = ui.subpagesize; if (mtd->min_io_size <= 0) { errmsg("%s has insane min. I/O unit size %d", @@ -356,7 +357,6 @@ int mtd_get_dev_info(const char *node, struct mtd_dev_info *mtd) if (ui.flags & MTD_WRITEABLE) mtd->writable = 1; - mtd->subpage_size = mtd->min_io_size; close(fd); |