summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorLuiz Capitulino2009-10-07 18:41:50 +0200
committerAnthony Liguori2009-10-09 04:17:18 +0200
commitd7f9b68971d5f9111afeae03c61199346b868c13 (patch)
treee6a7213e3a12de21f3b36465da481728cbff7d3d /monitor.c
parentIntroduce QList unit-tests (diff)
downloadqemu-d7f9b68971d5f9111afeae03c61199346b868c13.tar.gz
qemu-d7f9b68971d5f9111afeae03c61199346b868c13.tar.xz
qemu-d7f9b68971d5f9111afeae03c61199346b868c13.zip
monitor: Convert mon_cmd_t initializations to C99 style
Patchworks-ID: 35335 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c318
1 files changed, 248 insertions, 70 deletions
diff --git a/monitor.c b/monitor.c
index f79b83355a..ae0354a838 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1813,84 +1813,262 @@ static const mon_cmd_t mon_cmds[] = {
/* Please update qemu-monitor.hx when adding or changing commands */
static const mon_cmd_t info_cmds[] = {
- { "version", "", do_info_version,
- "", "show the version of QEMU" },
- { "network", "", do_info_network,
- "", "show the network state" },
- { "chardev", "", qemu_chr_info,
- "", "show the character devices" },
- { "block", "", bdrv_info,
- "", "show the block devices" },
- { "blockstats", "", bdrv_info_stats,
- "", "show block device statistics" },
- { "registers", "", do_info_registers,
- "", "show the cpu registers" },
- { "cpus", "", do_info_cpus,
- "", "show infos for each CPU" },
- { "history", "", do_info_history,
- "", "show the command line history", },
- { "irq", "", irq_info,
- "", "show the interrupts statistics (if available)", },
- { "pic", "", pic_info,
- "", "show i8259 (PIC) state", },
- { "pci", "", pci_info,
- "", "show PCI info", },
+ {
+ .name = "version",
+ .args_type = "",
+ .handler = do_info_version,
+ .params = "",
+ .help = "show the version of QEMU",
+ },
+ {
+ .name = "network",
+ .args_type = "",
+ .handler = do_info_network,
+ .params = "",
+ .help = "show the network state",
+ },
+ {
+ .name = "chardev",
+ .args_type = "",
+ .handler = qemu_chr_info,
+ .params = "",
+ .help = "show the character devices",
+ },
+ {
+ .name = "block",
+ .args_type = "",
+ .handler = bdrv_info,
+ .params = "",
+ .help = "show the block devices",
+ },
+ {
+ .name = "blockstats",
+ .args_type = "",
+ .handler = bdrv_info_stats,
+ .params = "",
+ .help = "show block device statistics",
+ },
+ {
+ .name = "registers",
+ .args_type = "",
+ .handler = do_info_registers,
+ .params = "",
+ .help = "show the cpu registers",
+ },
+ {
+ .name = "cpus",
+ .args_type = "",
+ .handler = do_info_cpus,
+ .params = "",
+ .help = "show infos for each CPU",
+ },
+ {
+ .name = "history",
+ .args_type = "",
+ .handler = do_info_history,
+ .params = "",
+ .help = "show the command line history",
+ },
+ {
+ .name = "irq",
+ .args_type = "",
+ .handler = irq_info,
+ .params = "",
+ .help = "show the interrupts statistics (if available)",
+ },
+ {
+ .name = "pic",
+ .args_type = "",
+ .handler = pic_info,
+ .params = "",
+ .help = "show i8259 (PIC) state",
+ },
+ {
+ .name = "pci",
+ .args_type = "",
+ .handler = pci_info,
+ .params = "",
+ .help = "show PCI info",
+ },
#if defined(TARGET_I386) || defined(TARGET_SH4)
- { "tlb", "", tlb_info,
- "", "show virtual to physical memory mappings", },
+ {
+ .name = "tlb",
+ .args_type = "",
+ .handler = tlb_info,
+ .params = "",
+ .help = "show virtual to physical memory mappings",
+ },
#endif
#if defined(TARGET_I386)
- { "mem", "", mem_info,
- "", "show the active virtual memory mappings", },
- { "hpet", "", do_info_hpet,
- "", "show state of HPET", },
+ {
+ .name = "mem",
+ .args_type = "",
+ .handler = mem_info,
+ .params = "",
+ .help = "show the active virtual memory mappings",
+ },
+ {
+ .name = "hpet",
+ .args_type = "",
+ .handler = do_info_hpet,
+ .params = "",
+ .help = "show state of HPET",
+ },
#endif
- { "jit", "", do_info_jit,
- "", "show dynamic compiler info", },
- { "kvm", "", do_info_kvm,
- "", "show KVM information", },
- { "numa", "", do_info_numa,
- "", "show NUMA information", },
- { "usb", "", usb_info,
- "", "show guest USB devices", },
- { "usbhost", "", usb_host_info,
- "", "show host USB devices", },
- { "profile", "", do_info_profile,
- "", "show profiling information", },
- { "capture", "", do_info_capture,
- "", "show capture information" },
- { "snapshots", "", do_info_snapshots,
- "", "show the currently saved VM snapshots" },
- { "status", "", do_info_status,
- "", "show the current VM status (running|paused)" },
- { "pcmcia", "", pcmcia_info,
- "", "show guest PCMCIA status" },
- { "mice", "", do_info_mice,
- "", "show which guest mouse is receiving events" },
- { "vnc", "", do_info_vnc,
- "", "show the vnc server status"},
- { "name", "", do_info_name,
- "", "show the current VM name" },
- { "uuid", "", do_info_uuid,
- "", "show the current VM UUID" },
+ {
+ .name = "jit",
+ .args_type = "",
+ .handler = do_info_jit,
+ .params = "",
+ .help = "show dynamic compiler info",
+ },
+ {
+ .name = "kvm",
+ .args_type = "",
+ .handler = do_info_kvm,
+ .params = "",
+ .help = "show KVM information",
+ },
+ {
+ .name = "numa",
+ .args_type = "",
+ .handler = do_info_numa,
+ .params = "",
+ .help = "show NUMA information",
+ },
+ {
+ .name = "usb",
+ .args_type = "",
+ .handler = usb_info,
+ .params = "",
+ .help = "show guest USB devices",
+ },
+ {
+ .name = "usbhost",
+ .args_type = "",
+ .handler = usb_host_info,
+ .params = "",
+ .help = "show host USB devices",
+ },
+ {
+ .name = "profile",
+ .args_type = "",
+ .handler = do_info_profile,
+ .params = "",
+ .help = "show profiling information",
+ },
+ {
+ .name = "capture",
+ .args_type = "",
+ .handler = do_info_capture,
+ .params = "",
+ .help = "show capture information",
+ },
+ {
+ .name = "snapshots",
+ .args_type = "",
+ .handler = do_info_snapshots,
+ .params = "",
+ .help = "show the currently saved VM snapshots",
+ },
+ {
+ .name = "status",
+ .args_type = "",
+ .handler = do_info_status,
+ .params = "",
+ .help = "show the current VM status (running|paused)",
+ },
+ {
+ .name = "pcmcia",
+ .args_type = "",
+ .handler = pcmcia_info,
+ .params = "",
+ .help = "show guest PCMCIA status",
+ },
+ {
+ .name = "mice",
+ .args_type = "",
+ .handler = do_info_mice,
+ .params = "",
+ .help = "show which guest mouse is receiving events",
+ },
+ {
+ .name = "vnc",
+ .args_type = "",
+ .handler = do_info_vnc,
+ .params = "",
+ .help = "show the vnc server status",
+ },
+ {
+ .name = "name",
+ .args_type = "",
+ .handler = do_info_name,
+ .params = "",
+ .help = "show the current VM name",
+ },
+ {
+ .name = "uuid",
+ .args_type = "",
+ .handler = do_info_uuid,
+ .params = "",
+ .help = "show the current VM UUID",
+ },
#if defined(TARGET_PPC)
- { "cpustats", "", do_info_cpu_stats,
- "", "show CPU statistics", },
+ {
+ .name = "cpustats",
+ .args_type = "",
+ .handler = do_info_cpu_stats,
+ .params = "",
+ .help = "show CPU statistics",
+ },
#endif
#if defined(CONFIG_SLIRP)
- { "usernet", "", do_info_usernet,
- "", "show user network stack connection states", },
+ {
+ .name = "usernet",
+ .args_type = "",
+ .handler = do_info_usernet,
+ .params = "",
+ .help = "show user network stack connection states",
+ },
#endif
- { "migrate", "", do_info_migrate, "", "show migration status" },
- { "balloon", "", do_info_balloon,
- "", "show balloon information" },
- { "qtree", "", do_info_qtree,
- "", "show device tree" },
- { "qdm", "", do_info_qdm,
- "", "show qdev device model list" },
- { "roms", "", do_info_roms,
- "", "show roms" },
- { NULL, NULL, },
+ {
+ .name = "migrate",
+ .args_type = "",
+ .handler = do_info_migrate,
+ .params = "",
+ .help = "show migration status",
+ },
+ {
+ .name = "balloon",
+ .args_type = "",
+ .handler = do_info_balloon,
+ .params = "",
+ .help = "show balloon information",
+ },
+ {
+ .name = "qtree",
+ .args_type = "",
+ .handler = do_info_qtree,
+ .params = "",
+ .help = "show device tree",
+ },
+ {
+ .name = "qdm",
+ .args_type = "",
+ .handler = do_info_qdm,
+ .params = "",
+ .help = "show qdev device model list",
+ },
+ {
+ .name = "roms",
+ .args_type = "",
+ .handler = do_info_roms,
+ .params = "",
+ .help = "show roms",
+ },
+ {
+ .name = NULL,
+ },
};
/*******************************************************************/