virsh-host.c: Switch to c99 initialization of vshCmdInfo

This commit is contained in:
Michal Privoznik 2013-02-07 16:25:10 +01:00
parent 38d52f6318
commit f3ce4ec661
1 changed files with 87 additions and 40 deletions

View File

@ -43,9 +43,13 @@
* "capabilities" command
*/
static const vshCmdInfo info_capabilities[] = {
{"help", N_("capabilities")},
{"desc", N_("Returns capabilities of hypervisor/driver.")},
{NULL, NULL}
{.name = "help",
.data = N_("capabilities")
},
{.name = "desc",
.data = N_("Returns capabilities of hypervisor/driver.")
},
{.name = NULL}
};
static bool
@ -67,10 +71,14 @@ cmdCapabilities(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
* "connect" command
*/
static const vshCmdInfo info_connect[] = {
{"help", N_("(re)connect to hypervisor")},
{"desc",
N_("Connect to local hypervisor. This is built-in command after shell start up.")},
{NULL, NULL}
{.name = "help",
.data = N_("(re)connect to hypervisor")
},
{.name = "desc",
.data = N_("Connect to local hypervisor. This is built-in "
"command after shell start up.")
},
{.name = NULL}
};
static const vshCmdOptDef opts_connect[] = {
@ -125,9 +133,13 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
* "freecell" command
*/
static const vshCmdInfo info_freecell[] = {
{"help", N_("NUMA free memory")},
{"desc", N_("display available free memory for the NUMA cell.")},
{NULL, NULL}
{.name = "help",
.data = N_("NUMA free memory")
},
{.name = "desc",
.data = N_("display available free memory for the NUMA cell.")
},
{.name = NULL}
};
static const vshCmdOptDef opts_freecell[] = {
@ -257,9 +269,13 @@ cleanup:
* "nodeinfo" command
*/
static const vshCmdInfo info_nodeinfo[] = {
{"help", N_("node information")},
{"desc", N_("Returns basic information about the node.")},
{NULL, NULL}
{.name = "help",
.data = N_("node information")
},
{.name = "desc",
.data = N_("Returns basic information about the node.")
},
{.name = NULL}
};
static bool
@ -287,10 +303,14 @@ cmdNodeinfo(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
* "nodecpumap" command
*/
static const vshCmdInfo info_node_cpumap[] = {
{"help", N_("node cpu map")},
{"desc", N_("Displays the node's total number of CPUs, the number of"
" online CPUs and the list of online CPUs.")},
{NULL, NULL}
{.name = "help",
.data = N_("node cpu map")
},
{.name = "desc",
.data = N_("Displays the node's total number of CPUs, the number of"
" online CPUs and the list of online CPUs.")
},
{.name = NULL}
};
static bool
@ -326,9 +346,13 @@ cmdNodeCpuMap(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
* "nodecpustats" command
*/
static const vshCmdInfo info_nodecpustats[] = {
{"help", N_("Prints cpu stats of the node.")},
{"desc", N_("Returns cpu stats of the node, in nanoseconds.")},
{NULL, NULL}
{.name = "help",
.data = N_("Prints cpu stats of the node.")
},
{.name = "desc",
.data = N_("Returns cpu stats of the node, in nanoseconds.")
},
{.name = NULL}
};
static const vshCmdOptDef opts_node_cpustats[] = {
@ -459,9 +483,13 @@ cmdNodeCpuStats(vshControl *ctl, const vshCmd *cmd)
* "nodememstats" command
*/
static const vshCmdInfo info_nodememstats[] = {
{"help", N_("Prints memory stats of the node.")},
{"desc", N_("Returns memory stats of the node, in kilobytes.")},
{NULL, NULL}
{.name = "help",
.data = N_("Prints memory stats of the node.")
},
{.name = "desc",
.data = N_("Returns memory stats of the node, in kilobytes.")
},
{.name = NULL}
};
static const vshCmdOptDef opts_node_memstats[] = {
@ -521,10 +549,14 @@ cmdNodeMemStats(vshControl *ctl, const vshCmd *cmd)
* "nodesuspend" command
*/
static const vshCmdInfo info_nodesuspend[] = {
{"help", N_("suspend the host node for a given time duration")},
{"desc", N_("Suspend the host node for a given time duration "
"and attempt to resume thereafter.")},
{NULL, NULL}
{.name = "help",
.data = N_("suspend the host node for a given time duration")
},
{.name = "desc",
.data = N_("Suspend the host node for a given time duration "
"and attempt to resume thereafter.")
},
{.name = NULL}
};
static const vshCmdOptDef opts_node_suspend[] = {
@ -584,10 +616,13 @@ cmdNodeSuspend(vshControl *ctl, const vshCmd *cmd)
* "sysinfo" command
*/
static const vshCmdInfo info_sysinfo[] = {
{"help", N_("print the hypervisor sysinfo")},
{"desc",
N_("output an XML string for the hypervisor sysinfo, if available")},
{NULL, NULL}
{.name = "help",
.data = N_("print the hypervisor sysinfo")
},
{.name = "desc",
.data = N_("output an XML string for the hypervisor sysinfo, if available")
},
{.name = NULL}
};
static bool
@ -611,9 +646,13 @@ cmdSysinfo(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
* "hostname" command
*/
static const vshCmdInfo info_hostname[] = {
{"help", N_("print the hypervisor hostname")},
{"desc", ""},
{NULL, NULL}
{.name = "help",
.data = N_("print the hypervisor hostname")
},
{.name = "desc",
.data = ""
},
{.name = NULL}
};
static bool
@ -637,9 +676,13 @@ cmdHostname(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
* "uri" command
*/
static const vshCmdInfo info_uri[] = {
{"help", N_("print the hypervisor canonical URI")},
{"desc", ""},
{NULL, NULL}
{.name = "help",
.data = N_("print the hypervisor canonical URI")
},
{.name = "desc",
.data = ""
},
{.name = NULL}
};
static bool
@ -663,9 +706,13 @@ cmdURI(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
* "version" command
*/
static const vshCmdInfo info_version[] = {
{"help", N_("show version")},
{"desc", N_("Display the system version information.")},
{NULL, NULL}
{.name = "help",
.data = N_("show version")
},
{.name = "desc",
.data = N_("Display the system version information.")
},
{.name = NULL}
};
static const vshCmdOptDef opts_version[] = {