mtd/fs/jffs2/ecos/src fs-ecos.c,1.17,1.18

David Woodhouse dwmw2 at infradead.org
Tue Nov 25 06:35:10 EST 2003


Update of /home/cvs/mtd/fs/jffs2/ecos/src
In directory phoenix.infradead.org:/tmp/cvs-serv18676

Modified Files:
	fs-ecos.c 
Log Message:
ugly hack to fix cwd handling

Index: fs-ecos.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/fs-ecos.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- fs-ecos.c	25 Nov 2003 11:25:48 -0000	1.17
+++ fs-ecos.c	25 Nov 2003 11:35:08 -0000	1.18
@@ -599,6 +599,18 @@
 			// root icount was set to 1 on mount
 			return EBUSY;
                 }
+		if (root->i_count == 2 &&
+		    cyg_cdir_dir == (cyg_dir)root &&
+		    !strcmp(mte->name, "/")) {
+			/* If we were mounted on root, there's no
+			   way for the cwd to change out and free 
+			   the file system for unmounting. So we hack
+			   it -- if cwd is '/' we unset it. Perhaps
+			   we should allow chdir(NULL) to unset
+			   cyg_cdir_dir? */
+			cyg_cdir_dir = CYG_DIR_NULL;
+			xiput(root);
+		}
 		if (root->i_count != 1) {
 			printf("Ino #1 has use count %d\n",
 			       root->i_count);




More information about the linux-mtd-cvs mailing list