summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkfs.ubifs/devtable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkfs.ubifs/devtable.c b/mkfs.ubifs/devtable.c
index 236a6e7..dee035d 100644
--- a/mkfs.ubifs/devtable.c
+++ b/mkfs.ubifs/devtable.c
@@ -248,7 +248,7 @@ static int interpret_table_entry(const char *line)
goto out_free;
}
} else {
- int i, num = start + increment * count, len = strlen(name) + 20;
+ int i, num = start + count, len = strlen(name) + 20;
char *nm;
for (i = start; i < num; i++) {
@@ -262,7 +262,7 @@ static int interpret_table_entry(const char *line)
nh_elt->mode = mode;
nh_elt->uid = uid;
nh_elt->gid = gid;
- nh_elt->dev = makedev(major, minor + i - start);
+ nh_elt->dev = makedev(major, minor + (i - start) * increment);
nm = malloc(len);
if (!nm) {