This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: STABLE3 - dlm_tool: fix lockdebug parsing of first_lkid


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=2766506287ef45dce3eb060fba23fd93538114d2
Commit:        2766506287ef45dce3eb060fba23fd93538114d2
Parent:        4fc740093e8b51d5a12c7110ac49ea99a880156f
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Wed Mar 11 16:05:08 2009 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Wed Mar 11 16:05:08 2009 -0500

dlm_tool: fix lockdebug parsing of first_lkid

It's unusual for first_lkid to be non-zero, wasn't being parsed properly.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 dlm/tool/main.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dlm/tool/main.c b/dlm/tool/main.c
index d055b69..d091051 100644
--- a/dlm/tool/main.c
+++ b/dlm/tool/main.c
@@ -388,7 +388,7 @@ void do_leave(char *name)
 	printf("done\n");
 }
 
-char *pr_master(int nodeid, uint32_t first_lkid)
+char *pr_master(int nodeid, char *first_lkid)
 {
 	static char buf[64];
 
@@ -399,7 +399,7 @@ char *pr_master(int nodeid, uint32_t first_lkid)
 	else if (!nodeid)
 		sprintf(buf, "Master");
 	else if (nodeid == -1)
-		sprintf(buf, "Lookup lkid %08x", first_lkid);
+		sprintf(buf, "Lookup lkid %s", first_lkid);
 
 	return buf;
 }
@@ -422,14 +422,15 @@ void print_rsb(char *line, struct rinfo *ri)
 {
 	char type[4], namefmt[4], *p;
 	char addr[64];
+	char first_lkid[64];
 	int rv, nodeid, root_list, recover_list, recover_locks_count, namelen;
-	uint32_t first_lkid, flags;
+	uint32_t flags;
 
-	rv = sscanf(line, "%s %s %d %u %u %d %d %u %u %s",
+	rv = sscanf(line, "%s %s %d %s %u %d %d %u %u %s",
 		    type,
 		    addr,
 		    &nodeid,
-		    &first_lkid,
+		    first_lkid,
 		    &flags,
 		    &root_list,
 		    &recover_list,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]