[Ocfs2-tools-commits] zab commits r287 - trunk/fsck.ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Sep 29 17:52:54 CDT 2004


Author: zab
Date: 2004-09-29 17:52:52 -0500 (Wed, 29 Sep 2004)
New Revision: 287

Modified:
   trunk/fsck.ocfs2/pass2.c
Log:
o return _CHANGED if we repair invalid dirent names


Modified: trunk/fsck.ocfs2/pass2.c
===================================================================
--- trunk/fsck.ocfs2/pass2.c	2004-09-29 22:09:07 UTC (rev 286)
+++ trunk/fsck.ocfs2/pass2.c	2004-09-29 22:52:52 UTC (rev 287)
@@ -182,8 +182,7 @@
 			   struct ocfs2_dir_entry *dirent, int offset)
 {
 	char *chr = dirent->name;
-	int len = dirent->name_len;
-	int fix = 0;
+	int len = dirent->name_len, fix = 0, ret_flags = 0;
 
 	for(; len-- && (*chr == '/' || *chr == '\0'); chr++) {
 		/* XXX in %s parent name */
@@ -196,7 +195,10 @@
 				return 0;
 		}
 		*chr = '.';
+		ret_flags = OCFS2_DIRENT_CHANGED;
 	}
+
+	return ret_flags;
 }
 
 /* this could certainly be more clever to issue reads in groups */



More information about the Ocfs2-tools-commits mailing list