mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2026-01-17 18:51:05 +00:00
cfgtool: Use CS_PRI_NODE_ID for formatting nodeid
Signed-off-by: Jan Friesse <jfriesse@redhat.com> Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
This commit is contained in:
parent
2856a6d85e
commit
49999d0692
@ -57,6 +57,7 @@ typedef int64_t cs_time_t;
|
||||
#define CS_MAX(x, y) (((x) > (y)) ? (x) : (y))
|
||||
|
||||
#define CS_PRI_NODE_ID "%" PRIu32
|
||||
#define CS_PRI_NODE_ID_PADDED "%10" PRIu32
|
||||
#define CS_PRI_RING_ID_SEQ "%" PRIx64
|
||||
#define CS_PRI_RING_ID "%" PRIx32 ".%" PRIx64
|
||||
/**
|
||||
|
||||
@ -240,7 +240,7 @@ nodestatusget_do (enum user_action action, int brief)
|
||||
if (result == CS_OK) {
|
||||
/* Only display node info if it is reachable (and not us) */
|
||||
if (node_status.reachable && node_status.nodeid != local_nodeid) {
|
||||
printf("nodeid: %d", node_status.nodeid);
|
||||
printf("nodeid: " CS_PRI_NODE_ID "", node_status.nodeid);
|
||||
printf(" reachable");
|
||||
if (node_status.remote) {
|
||||
printf(" remote");
|
||||
@ -311,7 +311,7 @@ nodestatusget_do (enum user_action action, int brief)
|
||||
} else {
|
||||
printf("\tstatus:\n");
|
||||
for (j=0; j<s; j++) {
|
||||
printf("\t\tnodeid: %3d:\t", node_info[j].nodeid);
|
||||
printf("\t\tnodeid: " CS_PRI_NODE_ID_PADDED ":\t", node_info[j].nodeid);
|
||||
if (j == local_nodeid_index) {
|
||||
printf("localhost");
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user