ctdb-tools: Print PNN as int in "ctdb ip -v"
authorMartin Schwenke <martin@meltin.net>
Thu, 8 Dec 2016 00:37:06 +0000 (11:37 +1100)
committerAmitay Isaacs <amitay@samba.org>
Fri, 16 Dec 2016 07:42:32 +0000 (08:42 +0100)
Otherwise it prints 4294967295 for the PNN.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12470

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tools/ctdb.c

index 46e33a4699b08d46bafe3d301dd3c7c8e9e91920..83693add17233fd0327b3182922437faab8df1d8 100644 (file)
@@ -1476,8 +1476,9 @@ static void print_ip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
                               avail ? avail : "", options.sep,
                               conf ? conf : "", options.sep);
                } else {
-                       printf(" node[%u] active[%s] available[%s] configured[%s]\n",
-                              ips->ip[i].pnn, active ? active : "",
+                       printf(" node[%d] active[%s] available[%s]"
+                              " configured[%s]\n",
+                              (int)ips->ip[i].pnn, active ? active : "",
                               avail ? avail : "", conf ? conf : "");
                }
        }