diff options
author | Thomas Chou <thomas@wytron.com.tw> | 2010-12-31 11:16:06 +0800 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-01-16 20:50:38 +0200 |
commit | 4d91ded71d78c5c651482f0e4ae082b73edba0c1 (patch) | |
tree | 51574d82c5eee3f14208ed219eb0e527eafbc7dd /mkfs.jffs2.c | |
parent | f0cc488fd772934bd41c6afdbee495f20d8516df (diff) |
mkfs.jffs2: fix devtable count as mkfs.ubifs does
The counting was incorrect. Follow that of mkfs.ubifs.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'mkfs.jffs2.c')
-rw-r--r-- | mkfs.jffs2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c index 256eec4..167af1f 100644 --- a/mkfs.jffs2.c +++ b/mkfs.jffs2.c @@ -497,10 +497,10 @@ static int interpret_table_entry(struct filesystem_entry *root, char *line) unsigned long i; char *dname, *hpath; - for (i = start; i < count; i++) { + for (i = start; i < (start + count); i++) { xasprintf(&dname, "%s%lu", name, i); xasprintf(&hpath, "%s/%s%lu", rootdir, name, i); - rdev = makedev(major, minor + (i * increment - start)); + rdev = makedev(major, minor + (i - start) * increment); add_host_filesystem_entry(dname, hpath, uid, gid, mode, rdev, parent); free(dname); |