From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28034 invoked by alias); 5 Feb 2009 11:20:24 -0000 Received: (qmail 28025 invoked by alias); 5 Feb 2009 11:20:24 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com Subject: cluster: master - cman: print node ids as unsigned integers To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 8b706f3976348fb91ea392ecb7e5f88ebc56c020 X-Git-Newrev: c469ea22e6170760ca74a77f61bd2f6b13e90e92 From: Christine Caulfield Message-Id: <20090205112001.4B6931205B9@lists.fedorahosted.org> Date: Thu, 05 Feb 2009 11:20:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00386.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c469ea22e6170760ca74a77f61bd2f6b13e90e92 Commit: c469ea22e6170760ca74a77f61bd2f6b13e90e92 Parent: 8b706f3976348fb91ea392ecb7e5f88ebc56c020 Author: Christine Caulfield AuthorDate: Thu Feb 5 11:19:22 2009 +0000 Committer: Christine Caulfield CommitterDate: Thu Feb 5 11:19:22 2009 +0000 cman: print node ids as unsigned integers negative node ids just look silly Signed-off-by: Christine Caulfield --- cman/cman_tool/main.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c index ef71eca..450b31c 100644 --- a/cman/cman_tool/main.c +++ b/cman/cman_tool/main.c @@ -242,7 +242,7 @@ static void show_status(void) memset(&node, 0, sizeof(node)); if (cman_get_node(h, CMAN_NODEID_US, &node) == 0) { printf("Node name: %s\n", node.cn_name); - printf("Node ID: %d\n", node.cn_nodeid); + printf("Node ID: %u\n", node.cn_nodeid); } if (einfo->ei_num_addresses > 0) { printf("Multicast addresses: %s\n", einfo->ei_addresses); @@ -342,7 +342,7 @@ static void print_node(commandline_t *comline, cman_handle_t h, int *format, str } if (!comline->format_opts) { - printf("%8d %c %s\n", + printf("%8u %c %s\n", node->cn_nodeid, member_type, node->cn_name); } @@ -370,7 +370,7 @@ static void print_node(commandline_t *comline, cman_handle_t h, int *format, str case FMT_NONE: break; case FMT_ID: - printf("%d ", node->cn_nodeid); + printf("%u ", node->cn_nodeid); break; case FMT_NAME: printf("%s ", node->cn_name);