s3:rpcclient: Use C99 initializer for cmd_set in cmd_eventlog
authorAndreas Schneider <asn@samba.org>
Fri, 11 Jan 2019 13:57:21 +0000 (14:57 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:19 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source3/rpcclient/cmd_eventlog.c

index 949e02510b2e3d7c62fbd131b2d1257088dbb4ce..a22ab8a18ff3805235206a684bae53c4ad69cd69 100644 (file)
@@ -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,
+       },
 };