s3:rpcclient: Use C99 initializer for cmd_set in cmd_dfs
authorAndreas Schneider <asn@samba.org>
Tue, 8 Jan 2019 16:57:26 +0000 (17:57 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:17 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source3/rpcclient/cmd_dfs.c

index 43d17b346082451f92fbd0a358271494dbf3820f..1bc4d5c93c08bac87983bb7d654a73fb30620dad 100644 (file)
@@ -329,14 +329,68 @@ static WERROR cmd_dfs_getinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 
 struct cmd_set dfs_commands[] = {
 
-       { "DFS" },
-
-       { "dfsversion", RPC_RTYPE_WERROR, NULL, cmd_dfs_version, &ndr_table_netdfs, NULL, "Query DFS support",    "" },
-       { "dfsadd",     RPC_RTYPE_WERROR, NULL, cmd_dfs_add,     &ndr_table_netdfs, NULL, "Add a DFS share",      "" },
-       { "dfsremove",  RPC_RTYPE_WERROR, NULL, cmd_dfs_remove,  &ndr_table_netdfs, NULL, "Remove a DFS share",   "" },
-       { "dfsgetinfo", RPC_RTYPE_WERROR, NULL, cmd_dfs_getinfo, &ndr_table_netdfs, NULL, "Query DFS share info", "" },
-       { "dfsenum",    RPC_RTYPE_WERROR, NULL, cmd_dfs_enum,    &ndr_table_netdfs, NULL, "Enumerate dfs shares", "" },
-       { "dfsenumex",  RPC_RTYPE_WERROR, NULL, cmd_dfs_enumex,  &ndr_table_netdfs, NULL, "Enumerate dfs shares", "" },
-
-       { NULL }
+       { .name = "DFS" },
+
+       {
+               .name               = "dfsversion",
+               .returntype         = RPC_RTYPE_WERROR,
+               .ntfn               = NULL,
+               .wfn                = cmd_dfs_version,
+               .table              = &ndr_table_netdfs,
+               .rpc_pipe           = NULL,
+               .description        = "Query DFS support",
+               .usage              = "",
+       },
+       {
+               .name               = "dfsadd",
+               .returntype         = RPC_RTYPE_WERROR,
+               .ntfn               = NULL,
+               .wfn                = cmd_dfs_add,
+               .table              = &ndr_table_netdfs,
+               .rpc_pipe           = NULL,
+               .description        = "Add a DFS share",
+               .usage              = "",
+       },
+       {
+               .name               = "dfsremove",
+               .returntype         = RPC_RTYPE_WERROR,
+               .ntfn               = NULL,
+               .wfn                = cmd_dfs_remove,
+               .table              = &ndr_table_netdfs,
+               .rpc_pipe           = NULL,
+               .description        = "Remove a DFS share",
+               .usage              = "",
+       },
+       {
+               .name               = "dfsgetinfo",
+               .returntype         = RPC_RTYPE_WERROR,
+               .ntfn               = NULL,
+               .wfn                = cmd_dfs_getinfo,
+               .table              = &ndr_table_netdfs,
+               .rpc_pipe           = NULL,
+               .description        = "Query DFS share info",
+               .usage              = "",
+       },
+       {
+               .name               = "dfsenum",
+               .returntype         = RPC_RTYPE_WERROR,
+               .ntfn               = NULL,
+               .wfn                = cmd_dfs_enum,
+               .table              = &ndr_table_netdfs,
+               .rpc_pipe           = NULL,
+               .description        = "Enumerate dfs shares",
+               .usage              = "",
+       },
+       {
+               .name               = "dfsenumex",
+               .returntype         = RPC_RTYPE_WERROR,
+               .ntfn               = NULL,
+               .wfn                = cmd_dfs_enumex,
+               .table              = &ndr_table_netdfs,
+               .rpc_pipe           = NULL,
+               .description        = "Enumerate dfs shares",
+               .usage              = "",
+       },
+
+       { .name = NULL }
 };