From eee66741f6e0f3432ebb8a14deb79ce0f18c1d7a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 11 Jan 2019 14:57:21 +0100 Subject: [PATCH] s3:rpcclient: Use C99 initializer for cmd_set in cmd_eventlog Signed-off-by: Andreas Schneider Reviewed-by: Douglas Bagnall --- source3/rpcclient/cmd_eventlog.c | 96 ++++++++++++++++++++++++++++---- 1 file changed, 86 insertions(+), 10 deletions(-) diff --git a/source3/rpcclient/cmd_eventlog.c b/source3/rpcclient/cmd_eventlog.c index 949e02510b2..a22ab8a18ff 100644 --- a/source3/rpcclient/cmd_eventlog.c +++ b/source3/rpcclient/cmd_eventlog.c @@ -561,14 +561,90 @@ static NTSTATUS cmd_eventlog_loginfo(struct rpc_pipe_client *cli, struct cmd_set eventlog_commands[] = { - { "EVENTLOG" }, - { "eventlog_readlog", RPC_RTYPE_NTSTATUS, cmd_eventlog_readlog, NULL, &ndr_table_eventlog, NULL, "Read Eventlog", "" }, - { "eventlog_numrecord", RPC_RTYPE_NTSTATUS, cmd_eventlog_numrecords, NULL, &ndr_table_eventlog, NULL, "Get number of records", "" }, - { "eventlog_oldestrecord", RPC_RTYPE_NTSTATUS, cmd_eventlog_oldestrecord, NULL, &ndr_table_eventlog, NULL, "Get oldest record", "" }, - { "eventlog_reportevent", RPC_RTYPE_NTSTATUS, cmd_eventlog_reportevent, NULL, &ndr_table_eventlog, NULL, "Report event", "" }, - { "eventlog_reporteventsource", RPC_RTYPE_NTSTATUS, cmd_eventlog_reporteventsource, NULL, &ndr_table_eventlog, NULL, "Report event and source", "" }, - { "eventlog_registerevsource", RPC_RTYPE_NTSTATUS, cmd_eventlog_registerevsource, NULL, &ndr_table_eventlog, NULL, "Register event source", "" }, - { "eventlog_backuplog", RPC_RTYPE_NTSTATUS, cmd_eventlog_backuplog, NULL, &ndr_table_eventlog, NULL, "Backup Eventlog File", "" }, - { "eventlog_loginfo", RPC_RTYPE_NTSTATUS, cmd_eventlog_loginfo, NULL, &ndr_table_eventlog, NULL, "Get Eventlog Information", "" }, - { NULL } + { + .name = "EVENTLOG", + }, + { + .name = "eventlog_readlog", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_eventlog_readlog, + .wfn = NULL, + .table = &ndr_table_eventlog, + .rpc_pipe = NULL, + .description = "Read Eventlog", + .usage = "", + }, + { + .name = "eventlog_numrecord", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_eventlog_numrecords, + .wfn = NULL, + .table = &ndr_table_eventlog, + .rpc_pipe = NULL, + .description = "Get number of records", + .usage = "", + }, + { + .name = "eventlog_oldestrecord", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_eventlog_oldestrecord, + .wfn = NULL, + .table = &ndr_table_eventlog, + .rpc_pipe = NULL, + .description = "Get oldest record", + .usage = "", + }, + { + .name = "eventlog_reportevent", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_eventlog_reportevent, + .wfn = NULL, + .table = &ndr_table_eventlog, + .rpc_pipe = NULL, + .description = "Report event", + .usage = "", + }, + { + .name = "eventlog_reporteventsource", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_eventlog_reporteventsource, + .wfn = NULL, + .table = &ndr_table_eventlog, + .rpc_pipe = NULL, + .description = "Report event and source", + .usage = "", + }, + { + .name = "eventlog_registerevsource", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_eventlog_registerevsource, + .wfn = NULL, + .table = &ndr_table_eventlog, + .rpc_pipe = NULL, + .description = "Register event source", + .usage = "", + }, + { + .name = "eventlog_backuplog", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_eventlog_backuplog, + .wfn = NULL, + .table = &ndr_table_eventlog, + .rpc_pipe = NULL, + .description = "Backup Eventlog File", + .usage = "", + }, + { + .name = "eventlog_loginfo", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_eventlog_loginfo, + .wfn = NULL, + .table = &ndr_table_eventlog, + .rpc_pipe = NULL, + .description = "Get Eventlog Information", + .usage = "", + }, + { + .name = NULL, + }, }; -- 2.34.1