[Ocfs2-tools-commits] mfasheh commits r946 - trunk/extras

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Jun 14 19:23:05 CDT 2005


Author: mfasheh
Date: 2005-06-14 19:23:03 -0500 (Tue, 14 Jun 2005)
New Revision: 946

Modified:
   trunk/extras/encode_lockres.c
Log:
* encode_lockres wasn't using a large enough variable for decoding generation. fix this.



Modified: trunk/extras/encode_lockres.c
===================================================================
--- trunk/extras/encode_lockres.c	2005-06-14 18:51:00 UTC (rev 945)
+++ trunk/extras/encode_lockres.c	2005-06-15 00:23:03 UTC (rev 946)
@@ -66,6 +66,7 @@
 {
 	uint64_t blkno;
 	uint32_t generation;
+	unsigned long long tmp;
 	char type;
 	int i;
 
@@ -76,7 +77,8 @@
 
 	type = argv[1][0];
 	blkno = atoll(argv[2]);
-	generation = atoi(argv[3]);
+	tmp = atoll(argv[3]);
+	generation = (uint32_t) tmp;
 
 	for (i = 0; i < OCFS_NUM_LOCK_TYPES; i++)
 		if (type == ocfs2_lock_type_char[i])



More information about the Ocfs2-tools-commits mailing list