From d7fe5e2263ae24df5938c220b62029f6131543a1 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 20 Dec 2013 13:00:10 +0100 Subject: 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 --- fs/devfs-core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs') diff --git a/fs/devfs-core.c b/fs/devfs-core.c index a92d4347f8..44f0169e63 100644 --- a/fs/devfs-core.c +++ b/fs/devfs-core.c @@ -171,6 +171,7 @@ static int partition_ioctl(struct cdev *cdev, int request, void *buf) user->erasesize = cdev->mtd->erasesize; user->writesize = cdev->mtd->writesize; user->oobsize = cdev->mtd->oobsize; + user->subpagesize = cdev->mtd->writesize >> cdev->mtd->subpage_sft; user->mtd = cdev->mtd; /* The below fields are obsolete */ user->ecctype = -1; -- cgit v1.2.3