s3:utils: Use C99 initializer for poptOption in mvxattr
authorAndreas Schneider <asn@samba.org>
Mon, 14 Jan 2019 10:08:11 +0000 (11:08 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:16 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source3/utils/mvxattr.c

index 9cc2ec0d7819c8fa5dde694146b1befa17d1abce..1275c5c07f5e1ab9aa397813db166a265d940069 100644 (file)
@@ -111,12 +111,56 @@ int main(int argc, const char *argv[])
        poptContext pc;
        struct poptOption long_options[] = {
                POPT_AUTOHELP
-               {"from",                's', POPT_ARG_STRING,   &state.xattr_from,      's', "xattr source name" },
-               {"to",                  'd', POPT_ARG_STRING,   &state.xattr_to,        'd', "xattr destination name" },
-               {"follow-symlinks",     'l', POPT_ARG_NONE,     &state.follow_symlink,  'l', "follow symlinks, the default is to ignore them" },
-               {"print",               'p', POPT_ARG_NONE,     &state.print,           'p', "print files where the xattr got renamed" },
-               {"verbose",             'v', POPT_ARG_NONE,     &state.verbose,         'v', "print files as they are checked" },
-               {"force",               'f', POPT_ARG_NONE,     &state.force,           'f', "force overwriting of destination xattr" },
+               {
+                       .longName   = "from",
+                       .shortName  = 's',
+                       .argInfo    = POPT_ARG_STRING,
+                       .arg        = &state.xattr_from,
+                       .val        = 's',
+                       .descrip    = "xattr source name",
+               },
+               {
+                       .longName   = "to",
+                       .shortName  = 'd',
+                       .argInfo    = POPT_ARG_STRING,
+                       .arg        = &state.xattr_to,
+                       .val        = 'd',
+                       .descrip    = "xattr destination name",
+               },
+               {
+                       .longName   = "follow-symlinks",
+                       .shortName  = 'l',
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = &state.follow_symlink,
+                       .val        = 'l',
+                       .descrip    = "follow symlinks, the default is to "
+                                     "ignore them",
+               },
+               {
+                       .longName   = "print",
+                       .shortName  = 'p',
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = &state.print,
+                       .val        = 'p',
+                       .descrip    = "print files where the xattr got "
+                                     "renamed",
+               },
+               {
+                       .longName   = "verbose",
+                       .shortName  = 'v',
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = &state.verbose,
+                       .val        = 'v',
+                       .descrip    = "print files as they are checked",
+               },
+               {
+                       .longName   = "force",
+                       .shortName  = 'f',
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = &state.force,
+                       .val        = 'f',
+                       .descrip    = "force overwriting of destination xattr",
+               },
                POPT_TABLEEND
        };
        TALLOC_CTX *frame = talloc_stackframe();