From 0a6f78d736f20bb02719a4f99ce9b6ecb96d0755 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 14 Jan 2019 09:51:05 +0100 Subject: [PATCH] s3:rpcclient: Use C99 initializer for cmd_set in cmd_shutdown Signed-off-by: Andreas Schneider Reviewed-by: Douglas Bagnall --- source3/rpcclient/cmd_shutdown.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/source3/rpcclient/cmd_shutdown.c b/source3/rpcclient/cmd_shutdown.c index 7cf4a30c5751..72027a86b440 100644 --- a/source3/rpcclient/cmd_shutdown.c +++ b/source3/rpcclient/cmd_shutdown.c @@ -104,14 +104,34 @@ static NTSTATUS cmd_shutdown_abort(struct cli_state *cli, /* List of commands exported by this module */ struct cmd_set shutdown_commands[] = { - { "SHUTDOWN" }, + { + .name = "SHUTDOWN", + }, #if 0 - { "shutdowninit", RPC_RTYPE_NTSTATUS, cmd_shutdown_init, NULL, &ndr_table_initshutdown.syntax_id, "Remote Shutdown (over shutdown pipe)", - "syntax: shutdown [-m message] [-t timeout] [-r] [-h] [-f] (-r == reboot, -h == halt, -f == force)" }, + { + .name = "shutdowninit", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_shutdown_init, + .wfn = NULL, + .table = &ndr_table_initshutdown.syntax_id, + .rpc_pipe = "Remote Shutdown (over shutdown pipe)", + .description = "syntax: shutdown [-m message] " + "[-t timeout] [-r] [-h] [-f] (-r == " + "reboot, -h == halt, -f == force)", + }, - { "shutdownabort", RPC_RTYPE_NTSTATUS, cmd_shutdown_abort, NULL, &ndr_table_initshutdown.syntax_id, "Abort Shutdown (over shutdown pipe)", - "syntax: shutdownabort" }, + { + .name = "shutdownabort", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_shutdown_abort, + .wfn = NULL, + .table = &ndr_table_initshutdown.syntax_id, + .rpc_pipe = "Abort Shutdown (over shutdown pipe)", + .description = "syntax: shutdownabort", + }, #endif - { NULL } + { + .name = NULL, + }, }; -- 2.34.1