1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

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>
This commit is contained in:
Andreas Schneider 2019-01-08 11:59:31 +01:00 committed by Andreas Schneider
parent b9924839ce
commit db6992c2e9

View File

@ -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
};