]> www.infradead.org Git - mtd-utils.git/commitdiff
mkfs.jffs2: fix repeated dev nodes v1.4.2
authorThomas Chou <thomas@wytron.com.tw>
Fri, 31 Dec 2010 01:45:19 +0000 (09:45 +0800)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 16 Jan 2011 18:50:47 +0000 (20:50 +0200)
Fix the repeated nodes with the same primary name in device_table.txt.
They were not generated correctly.

/dev/tty    c    666    0    0    5    0    0    0    -
/dev/tty    c    666    0    0    4    0    0    1    6

# IDE Devices
/dev/hda    b    640    0    0    3    0    0    0    -
/dev/hda    b    640    0    0    3    1    1    1    15
/dev/hdb    b    640    0    0    3    64    0    0    -
/dev/hdb    b    640    0    0    3    65    1    1    15

Only created,
/dev/tty
/dev/hda
/dev/hdb

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
mkfs.jffs2.c

index 167af1f16e36bd84bcf0bc57344522fceb07a9d9..3aab53378493898a2b8dcb30cdf7b464aef4d35c 100644 (file)
@@ -457,7 +457,7 @@ static int interpret_table_entry(struct filesystem_entry *root, char *line)
                        errmsg_die("Unsupported file type '%c'", type);
        }
        entry = find_filesystem_entry(root, name, mode);
-       if (entry) {
+       if (entry && !(count > 0 && (type == 'c' || type == 'b'))) {
                /* Ok, we just need to fixup the existing entry
                 * and we will be all done... */
                entry->sb.st_uid = uid;