[Ocfs-tools-commits] khackel commits r63 - trunk/ocfs2/format

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon Jun 14 19:36:22 CDT 2004


Author: khackel
Date: 2004-06-14 18:36:19 -0500 (Mon, 14 Jun 2004)
New Revision: 63

Modified:
   trunk/ocfs2/format/mkfs2.c
Log:
fix the mode for all the system files (especially the root dir, the only visible one)

Modified: trunk/ocfs2/format/mkfs2.c
===================================================================
--- trunk/ocfs2/format/mkfs2.c	2004-06-14 20:42:00 UTC (rev 62)
+++ trunk/ocfs2/format/mkfs2.c	2004-06-14 23:36:19 UTC (rev 63)
@@ -613,11 +613,14 @@
 void format_file(system_file_disk_record *rec)
 {
 	ocfs2_dinode *di;
-	int mode = default_mode | (rec->dir ? S_IFDIR : S_IFREG);
+	int mode;
 	__u32 clusters;
+
+	if (default_mode)
+		mode = default_mode | (rec->dir ? S_IFDIR : S_IFREG);
+	else
+		mode = rec->dir ? 0755 | S_IFDIR: 0644 | S_IFREG;
 	
-	//rec->flags |= (OCFS2_VALID_FL | OCFS2_SYSTEM_FL);
-
 	clusters = (rec->extent_len + cluster_size - 1) >> cluster_size_bits;
 
 	di = mapping + rec->fe_off;



More information about the Ocfs-tools-commits mailing list