s4:cifsdd: Use C99 initializers for cifsdd argdef
authorAndreas Schneider <asn@samba.org>
Tue, 8 Jan 2019 10:49:28 +0000 (11:49 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:26 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source4/client/cifsdd.c

index 8ffb7b9a4174b4ea63fc8f789a9147b215ddde2b..dfdaf048b3f4c863e6e0fb6a96f7bc512201b5e7 100644 (file)
@@ -85,20 +85,64 @@ static const char * argtype_str(enum argtype arg_type)
 
 static struct argdef args[] =
 {
-       { "bs", ARG_SIZE,       "force ibs and obs to SIZE bytes" },
-       { "ibs", ARG_SIZE,      "read SIZE bytes at a time" },
-       { "obs", ARG_SIZE,      "write SIZE bytes at a time" },
+       {
+               .arg_name = "bs",
+               .arg_type = ARG_SIZE,
+               .arg_help = "force ibs and obs to SIZE bytes",
+       },
+       {
+               .arg_name = "ibs",
+               .arg_type = ARG_SIZE,
+               .arg_help = "read SIZE bytes at a time",
+       },
+       {
+               .arg_name = "obs",
+               .arg_type = ARG_SIZE,
+               .arg_help = "write SIZE bytes at a time",
+       },
 
-       { "count", ARG_NUMERIC, "copy COUNT input blocks" },
-       { "seek",ARG_NUMERIC,   "skip COUNT blocks at start of output" },
-       { "skip",ARG_NUMERIC,   "skip COUNT blocks at start of input" },
+       {
+               .arg_name = "count",
+               .arg_type = ARG_NUMERIC,
+               .arg_help = "copy COUNT input blocks",
+       },
+       {
+               .arg_name = "seek",
+               .arg_type = ARG_NUMERIC,
+               .arg_help = "skip COUNT blocks at start of output",
+       },
+       {
+               .arg_name = "skip",
+               .arg_type = ARG_NUMERIC,
+               .arg_help = "skip COUNT blocks at start of input",
+       },
 
-       { "if", ARG_PATHNAME,   "read input from FILE" },
-       { "of", ARG_PATHNAME,   "write output to FILE" },
+       {
+               .arg_name = "if",
+               .arg_type = ARG_PATHNAME,
+               .arg_help = "read input from FILE",
+       },
+       {
+               .arg_name = "of",
+               .arg_type = ARG_PATHNAME,
+               .arg_help = "write output to FILE",
+       },
 
-       { "direct", ARG_BOOL,   "use direct I/O if non-zero" },
-       { "sync", ARG_BOOL,     "use synchronous writes if non-zero" },
-       { "oplock", ARG_BOOL,   "take oplocks on the input and output files" },
+       {
+               .arg_name = "direct",
+               .arg_type = ARG_BOOL,
+               .arg_help = "use direct I/O if non-zero",
+       },
+       {
+               .arg_name = "sync",
+               .arg_type = ARG_BOOL,
+               .arg_help = "use synchronous writes if non-zero",
+       },
+       {
+               .arg_name = "oplock",
+               .arg_type = ARG_BOOL,
+               .arg_help = "take oplocks on the input and output files",
+       },
 
 /* FIXME: We should support using iflags and oflags for setting oplock and I/O
  * options. This would make us compatible with GNU dd.