CVS: unionfs: /unionfs: * super.c: Fixed compilation on 64-bit systems

Josef Sipek jsipek at fsl.cs.sunysb.edu
Fri Aug 25 14:53:04 EDT 2006


Log Message:
-----------
* super.c: Fixed compilation on 64-bit systems

Modified Files:
--------------
    unionfs:
        ChangeLog (r1.702 -> r1.703)
        super.c (r1.98 -> r1.99)

Revision Data
-------------
Index: super.c
===================================================================
RCS file: /home/cvs/unionfs/unionfs/super.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -Lsuper.c -Lsuper.c -u -d -b -B -p -r1.98 -r1.99
--- super.c
+++ super.c
@@ -684,18 +684,22 @@ enum {
 static void do_decode(__u32 * fh, struct dentry **hidden_root,
 		      ino_t * hidden_ino, ino_t * hidden_parent_ino)
 {
-	*hidden_root = (void *)fh[FhHRoot2];
+	unsigned long root;
+	
+	root = fh[FhHRoot2];
 	*hidden_ino = fh[FhHIno2];
 	*hidden_parent_ino = fh[FhHPIno2];
 #if BITS_PER_LONG == 64
-	*hidden_root |= fh[FhHRoot1] << 32;
-	*hidden_ino |= fh[FhHIno1] << 32;
-	*hidden_parent_ino |= fh[FhHPIno1] << 32;
+	root |= ((unsigned long)fh[FhHRoot1]) << 32;
+	*hidden_ino |= ((unsigned long) fh[FhHIno1]) << 32;
+	*hidden_parent_ino |= ((unsigned long) fh[FhHPIno1]) << 32;
 #elif BITS_PER_LONG == 32
 	/* ok */
 #else
 #error unknown size
 #endif
+
+	*hidden_root = (struct dentry*) root;
 }
 
 static int unionfs_encode_fh(struct dentry *dentry, __u32 * fh, int *max_len,
@@ -739,11 +743,11 @@ static int unionfs_encode_fh(struct dent
 	unlock_dentry(sb->s_root);
 	h_ino = itohi_index(dentry->d_inode, bindex)->i_ino;
 	hp_ino = parent_ino(dtohd(dentry));
-	fh[FhHRoot2] = (__u32) h_root;
+	fh[FhHRoot2] = (unsigned long) h_root;
 	fh[FhHIno2] = h_ino;
 	fh[FhHPIno2] = hp_ino;
 #if BITS_PER_LONG == 64
-	fh[FhHRoot1] = h_root >> 32;
+	fh[FhHRoot1] = ((unsigned long) h_root) >> 32;
 	fh[FhHIno1] = h_ino >> 32;
 	fh[FhHPIno1] = hp_ino >> 32;
 #endif
Index: ChangeLog
===================================================================
RCS file: /home/cvs/unionfs/unionfs/ChangeLog,v
retrieving revision 1.702
retrieving revision 1.703
diff -LChangeLog -LChangeLog -u -d -b -B -p -r1.702 -r1.703
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,7 @@
+2006-08-25  Josef "Jeff" Sipek  <jsipek at fsl.cs.sunysb.edu>
+
+	* super.c: Fixed compilation on 64-bit systems
+
 2006-08-05  Junjiro Okajima  <hooanon05 at yahoo.co.jp>
 
 	* ALL: Copyright header update (fixed my name - added 'Jeff', added


More information about the unionfs-cvs mailing list