From 22dde50be3df61830fc74a189e1c3b0e431bb001 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Mon, 28 Sep 2009 13:39:54 +1000 Subject: [PATCH] add machinereadable output for the ctdb getreclock command (This used to be ctdb commit 5e7dc36f1649824db2f9dab34bede8b388502a57) --- ctdb/tools/ctdb.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 0b263f225e0..223be3f3c42 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -2529,10 +2529,16 @@ static int control_getreclock(struct ctdb_context *ctdb, int argc, const char ** DEBUG(DEBUG_ERR, ("Unable to get reclock file from node %u\n", options.pnn)); return ret; } else { - if (reclock == NULL) { - printf("No reclock file used.\n"); + if (options.machinereadable){ + if (reclock != NULL) { + printf("%s", reclock); + } } else { - printf("Reclock file:%s\n", reclock); + if (reclock == NULL) { + printf("No reclock file used.\n"); + } else { + printf("Reclock file:%s\n", reclock); + } } } return 0;