public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - dlm_tool: fix lockdebug parsing of first_lkid
@ 2009-03-11 21:09 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-03-11 21:09 UTC (permalink / raw)
  To: cluster-cvs-relay

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,


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-11 21:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 21:09 cluster: STABLE3 - dlm_tool: fix lockdebug parsing of first_lkid David Teigland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).