summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-01-08 11:59:31 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-28 10:29:12 +0100
commitdb6992c2e9037444b6976e9b9c32ced97017b41f (patch)
treee07b11c098f07e8937d092c66e2d5628c654258c /ctdb
parentb9924839ce6c4f8da56566fb0193a626696ab55b (diff)
downloadsamba-db6992c2e9037444b6976e9b9c32ced97017b41f.tar.gz
ctdb: Use C99 initializer for poptOption in ctdb tool
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/tools/ctdb.c80
1 files changed, 64 insertions, 16 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index ee64566ba04..bef9c5f97fb 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -6068,22 +6068,70 @@ static void usage(const char *command)
struct poptOption cmdline_options[] = {
POPT_AUTOHELP
- { "debug", 'd', POPT_ARG_STRING, &options.debuglevelstr, 0,
- "debug level"},
- { "timelimit", 't', POPT_ARG_INT, &options.timelimit, 0,
- "timelimit (in seconds)" },
- { "node", 'n', POPT_ARG_INT, &options.pnn, 0,
- "node specification - integer" },
- { NULL, 'Y', POPT_ARG_NONE, &options.machinereadable, 0,
- "enable machine readable output", NULL },
- { "separator", 'x', POPT_ARG_STRING, &options.sep, 0,
- "specify separator for machine readable output", "CHAR" },
- { NULL, 'X', POPT_ARG_NONE, &options.machineparsable, 0,
- "enable machine parsable output with separator |", 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)" },
+ {
+ .longName = "debug",
+ .shortName = 'd',
+ .argInfo = POPT_ARG_STRING,
+ .arg = &options.debuglevelstr,
+ .val = 0,
+ .descrip = "debug level",
+ },
+ {
+ .longName = "timelimit",
+ .shortName = 't',
+ .argInfo = POPT_ARG_INT,
+ .arg = &options.timelimit,
+ .val = 0,
+ .descrip = "timelimit (in seconds)",
+ },
+ {
+ .longName = "node",
+ .shortName = 'n',
+ .argInfo = POPT_ARG_INT,
+ .arg = &options.pnn,
+ .val = 0,
+ .descrip = "node specification - integer",
+ },
+ {
+ .longName = NULL,
+ .shortName = 'Y',
+ .argInfo = POPT_ARG_NONE,
+ .arg = &options.machinereadable,
+ .val = 0,
+ .descrip = "enable machine readable output",
+ },
+ {
+ .longName = "separator",
+ .shortName = 'x',
+ .argInfo = POPT_ARG_STRING,
+ .arg = &options.sep,
+ .val = 0,
+ .descrip = "specify separator for machine readable output",
+ .argDescrip = "CHAR",
+ },
+ {
+ .shortName = 'X',
+ .argInfo = POPT_ARG_NONE,
+ .arg = &options.machineparsable,
+ .val = 0,
+ .descrip = "enable machine parsable output with separator |",
+ },
+ {
+ .longName = "verbose",
+ .shortName = 'v',
+ .argInfo = POPT_ARG_NONE,
+ .arg = &options.verbose,
+ .val = 0,
+ .descrip = "enable verbose output",
+ },
+ {
+ .longName = "maxruntime",
+ .shortName = 'T',
+ .argInfo = POPT_ARG_INT,
+ .arg = &options.maxruntime,
+ .val = 0,
+ .descrip = "die if runtime exceeds this limit (in seconds)",
+ },
POPT_TABLEEND
};