summaryrefslogtreecommitdiff
path: root/package/mtd/20061007/mtd-20061007-mkfs.jffs2.patch
blob: 3c4d6bad62ad559e0f0c042cdd9ff7985ede13ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff -urN mtd-20061007.orig-0rig/mkfs.jffs2.c mtd-20061007.orig/mkfs.jffs2.c
--- mtd-20061007.orig-0rig/mkfs.jffs2.c	2006-10-07 17:33:37.000000000 +0200
+++ mtd-20061007.orig/mkfs.jffs2.c	2007-04-09 02:16:06.000000000 +0200
@@ -240,6 +242,15 @@
 {
 	struct filesystem_entry *e = dir;
 
+	if((strlen(fullname) == 1) && (fullname[0] == '/')) {
+		/* Looking for "root" */
+		if(e != NULL) {
+			if((strlen(e->fullname) == 1) && (e->fullname[0] == '/')) {
+				return (e);
+			}
+		} 
+	}
+
 	if (S_ISDIR(dir->sb.st_mode)) {
 		e = dir->files;
 	}