add a new commandline flag -v to enable verbose output
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 20 Aug 2010 01:28:24 +0000 (11:28 +1000)
committerMichael Adam <obnox@samba.org>
Thu, 12 Jan 2012 07:36:58 +0000 (08:36 +0100)
(cherry picked from commit 96dd9f40f9464c3d9de98f1323568724a1e31dc9)

tools/ctdb.c

index 09c849cdd58d25612b5593fd37a26f556ab37c04..2ecbb34e3bb56251457b5dd10647175be3f2cbb5 100644 (file)
@@ -41,6 +41,7 @@ static struct {
        int timelimit;
        uint32_t pnn;
        int machinereadable;
+       int verbose;
        int maxruntime;
 } options;
 
@@ -4424,6 +4425,7 @@ static void usage(void)
 "Options:\n" \
 "   -n <node>          choose node number, or 'all' (defaults to local node)\n"
 "   -Y                 generate machinereadable output\n"
+"   -v                 generate verbose output\n"
 "   -t <timelimit>     set timelimit for control in seconds (default %u)\n", options.timelimit);
        printf("Controls:\n");
        for (i=0;i<ARRAY_SIZE(ctdb_commands);i++) {
@@ -4455,6 +4457,7 @@ int main(int argc, const char *argv[])
                { "timelimit", 't', POPT_ARG_INT, &options.timelimit, 0, "timelimit", "integer" },
                { "node",      'n', POPT_ARG_STRING, &nodestring, 0, "node", "integer|all" },
                { "machinereadable", 'Y', POPT_ARG_NONE, &options.machinereadable, 0, "enable machinereadable output", NULL },
+               { "verbose",    'v', POPT_ARG_NONE, &options.verbose, 0, "enable verbose output", NULL },
                { "maxruntime", 'T', POPT_ARG_INT, &options.maxruntime, 0, "die if runtime exceeds this limit (in seconds)", "integer" },
                POPT_TABLEEND
        };