Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4fb... Commit: 4fb9b3c95de063b1797293c97cab1925b34e40e2 Parent: 6e92dab912882158b19c16971328dda3e0387e1d Author: David Teigland teigland@redhat.com AuthorDate: Mon May 14 13:50:58 2012 -0500 Committer: David Teigland teigland@redhat.com CommitterDate: Mon May 14 13:54:52 2012 -0500
dlm_tool: new master format
Change the way master nodeid's are displayed from: "Master" (on master nodeid N) "Local N" (on other nodes)
to:
"Master" (on master nodeid N) "Master:N" (on other nodes)
Signed-off-by: David Teigland teigland@redhat.com --- dlm_tool/main.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlm_tool/main.c b/dlm_tool/main.c index a512f9c..bcaf8e4 100644 --- a/dlm_tool/main.c +++ b/dlm_tool/main.c @@ -474,7 +474,7 @@ static char *pr_master(int nodeid) memset(buf, 0, sizeof(buf));
if (nodeid > 0) - sprintf(buf, "Local %d", nodeid); + sprintf(buf, "Master:%d", nodeid); else if (!nodeid) sprintf(buf, "Master"); else if (nodeid == -1) @@ -779,18 +779,25 @@ static void print_rsb_toss(char *line) else goto fail;
- printf("Dir %d master %d our %d ", - dir_nodeid, master_nodeid, our_nodeid); + if (master_nodeid != our_nodeid) + printf("Master:%d", master_nodeid); + else + printf("Master"); + + if (dir_nodeid != our_nodeid) + printf(" Dir:%d", dir_nodeid); + else + printf(" Dir");
if (master_nodeid == our_nodeid && res_nodeid != 0) - printf("res %d", res_nodeid); + printf(" res_nodeid %d", res_nodeid);
printf("\n");
return;
fail: - fprintf(stderr, "print_rsb error rv %d line "%s"\n", rv, line); + fprintf(stderr, "print_rsb_toss error rv %d line "%s"\n", rv, line); }
static void clear_rinfo(struct rinfo *ri)
cluster-commits@lists.fedorahosted.org