[Ocfs-tools-commits] manish commits r27 - trunk/format

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Apr 27 19:06:17 CDT 2004


Author: manish
Date: 2004-04-27 18:06:15 -0500 (Tue, 27 Apr 2004)
New Revision: 27

Modified:
   trunk/format/Makefile
   trunk/format/journal.c
Log:
Use g_ntohl instead of ntohl


Modified: trunk/format/Makefile
===================================================================
--- trunk/format/Makefile	2004-04-27 23:05:37 UTC (rev 26)
+++ trunk/format/Makefile	2004-04-27 23:06:15 UTC (rev 27)
@@ -9,7 +9,7 @@
 OPTS = -g
 endif
 
-CFLAGS = $(OPTS) -fno-strict-aliasing $(WARNINGS) -pthread
+CFLAGS = $(OPTS) -fno-strict-aliasing $(WARNINGS) -pthread $(GLIB_CFLAGS)
 
 SBIN_PROGRAMS = mkfs.ocfs mounted.ocfs tuneocfs
 

Modified: trunk/format/journal.c
===================================================================
--- trunk/format/journal.c	2004-04-27 23:05:37 UTC (rev 26)
+++ trunk/format/journal.c	2004-04-27 23:06:15 UTC (rev 27)
@@ -2,7 +2,7 @@
 #include <signal.h>
 #include <libgen.h>
 
-#include <netinet/in.h>
+#include <glib.h>
 
 #include "kernel-jbd.h"
 
@@ -18,14 +18,14 @@
 	
 	memset(sb, 0, OCFS_JOURNAL_DEFAULT_SIZE);
 
-	sb->s_header.h_magic	 = htonl(JFS_MAGIC_NUMBER);
-	sb->s_header.h_blocktype = htonl(JFS_SUPERBLOCK_V2);
-	sb->s_blocksize	= htonl(512);
-	sb->s_maxlen	= htonl(OCFS_JOURNAL_DEFAULT_SIZE / 512);
-	sb->s_first	= htonl(1);
-	sb->s_start     = htonl(1);
-	sb->s_sequence  = htonl(1);
-	sb->s_errno     = htonl(0);
+	sb->s_header.h_magic	 = g_htonl(JFS_MAGIC_NUMBER);
+	sb->s_header.h_blocktype = g_htonl(JFS_SUPERBLOCK_V2);
+	sb->s_blocksize	= g_htonl(512);
+	sb->s_maxlen	= g_htonl(OCFS_JOURNAL_DEFAULT_SIZE / 512);
+	sb->s_first	= g_htonl(1);
+	sb->s_start     = g_htonl(1);
+	sb->s_sequence  = g_htonl(1);
+	sb->s_errno     = g_htonl(0);
 
 	if (SetSeek(file, journal_off)) {
                 if (Write(file, OCFS_JOURNAL_DEFAULT_SIZE, (void *) sb)) {



More information about the Ocfs-tools-commits mailing list