With older mtd-utils, creating a directory in the root worked fine. With
current git, the parent dir search algo breaks this.
For example, just take the current git tree, build it up, and then run:
$ ./mkfs.jffs2 -d . -D device_table.txt -o /dev/null
mkfs.jffs2: skipping device_table entry '/dev': no parent directory!
mkfs.jffs2: skipping device_table entry '/dev/mem': no parent directory!
...
Doing `mkdir ./dev` first works around the issue, but where's the fun in
that.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
struct filesystem_entry *e = dir;
if (S_ISDIR(dir->sb.st_mode)) {
+ /* If this is the first call, and we actually want this
+ * directory, then return it now */
+ if (strcmp(fullname, e->fullname) == 0)
+ return e;
+
e = dir->files;
}
while (e) {