From 08d15d6c23a371ad75f8a242d6daceb19ff1468a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 6 Feb 2015 12:07:09 +0100 Subject: hmp: Clean up declarations for long-gone info handlers Leftovers from d1f2964 qapi: Convert query-spice 791e7c8 qapi: Convert query-migrate 0fe6a7f slirp: Drop statistic code Signed-off-by: Markus Armbruster --- include/migration/migration.h | 4 ---- include/sysemu/sysemu.h | 3 --- include/ui/qemu-spice.h | 3 --- 3 files changed, 10 deletions(-) (limited to 'include') diff --git a/include/migration/migration.h b/include/migration/migration.h index f37348b..703b7d7 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -71,10 +71,6 @@ void qemu_start_incoming_migration(const char *uri, Error **errp); uint64_t migrate_max_downtime(void); -void do_info_migrate_print(Monitor *mon, const QObject *data); - -void do_info_migrate(Monitor *mon, QObject **ret_data); - void exec_start_incoming_migration(const char *host_port, Error **errp); void exec_start_outgoing_migration(MigrationState *s, const char *host_port, Error **errp); diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 748d059..c42649c 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -90,9 +90,6 @@ void qemu_savevm_state_cancel(void); uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size); int qemu_loadvm_state(QEMUFile *f); -/* SLIRP */ -void do_info_slirp(Monitor *mon); - typedef enum DisplayType { DT_DEFAULT, diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 762e063..25b94c7 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -45,9 +45,6 @@ int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, const char *subject, MonitorCompletion cb, void *opaque); -void do_info_spice_print(Monitor *mon, const QObject *data); -void do_info_spice(Monitor *mon, QObject **ret_data); - CharDriverState *qemu_chr_open_spice_vmc(const char *type); #if SPICE_SERVER_VERSION >= 0x000c02 CharDriverState *qemu_chr_open_spice_port(const char *name); -- cgit v1.1 From 3e5a50d64ca9c323f8099fdf1aef02813598882d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 6 Feb 2015 13:55:43 +0100 Subject: hmp: Name HMP command handler functions hmp_COMMAND() Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(), and sometimes COMMAND pointlessly differs in spelling. Normalize to hmp_COMMAND(), where COMMAND is exactly the command name with '-' replaced by '_'. Exceptions: * do_device_add() and client_migrate_info() *not* renamed to hmp_device_add(), hmp_client_migrate_info(), because they're also QMP handlers. They still need to be converted to QAPI. * do_memory_dump(), do_physical_memory_dump(), do_ioport_read(), do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(), hmp_i(), hmp_o(), because those names are too cryptic for my taste. * do_info_help() renamed to hmp_info_help() instead of hmp_info(), because it only covers help. Signed-off-by: Markus Armbruster --- include/net/net.h | 4 ++-- include/net/slirp.h | 4 ++-- include/sysemu/block-backend.h | 2 +- include/sysemu/blockdev.h | 4 ++-- include/sysemu/sysemu.h | 16 ++++++++-------- include/ui/console.h | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/net/net.h b/include/net/net.h index 008d610..ac43a8e 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -187,8 +187,8 @@ int net_client_parse(QemuOptsList *opts_list, const char *str); int net_init_clients(void); void net_check_clients(void); void net_cleanup(void); -void net_host_device_add(Monitor *mon, const QDict *qdict); -void net_host_device_remove(Monitor *mon, const QDict *qdict); +void hmp_host_net_add(Monitor *mon, const QDict *qdict); +void hmp_host_net_remove(Monitor *mon, const QDict *qdict); void netdev_add(QemuOpts *opts, Error **errp); int qmp_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret); diff --git a/include/net/slirp.h b/include/net/slirp.h index 0502389..d3b64f6 100644 --- a/include/net/slirp.h +++ b/include/net/slirp.h @@ -31,8 +31,8 @@ #ifdef CONFIG_SLIRP -void net_slirp_hostfwd_add(Monitor *mon, const QDict *qdict); -void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict); +void hmp_hostfwd_add(Monitor *mon, const QDict *qdict); +void hmp_hostfwd_remove(Monitor *mon, const QDict *qdict); int net_slirp_redir(const char *redir_str); diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index aab12b9..33eb400 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -70,7 +70,7 @@ BlockBackend *blk_next(BlockBackend *blk); BlockDriverState *blk_bs(BlockBackend *blk); -void blk_hide_on_behalf_of_do_drive_del(BlockBackend *blk); +void blk_hide_on_behalf_of_hmp_drive_del(BlockBackend *blk); void blk_iostatus_enable(BlockBackend *blk); int blk_attach_dev(BlockBackend *blk, void *dev); diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h index 09d1e30..0c62643 100644 --- a/include/sysemu/blockdev.h +++ b/include/sysemu/blockdev.h @@ -67,6 +67,6 @@ DriveInfo *add_init_drive(const char *opts); void qmp_change_blockdev(const char *device, const char *filename, const char *format, Error **errp); -void do_commit(Monitor *mon, const QDict *qdict); -int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data); +void hmp_commit(Monitor *mon, const QDict *qdict); +int hmp_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data); #endif diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index c42649c..d132430 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -74,9 +74,9 @@ void qemu_remove_exit_notifier(Notifier *notify); void qemu_add_machine_init_done_notifier(Notifier *notify); -void do_savevm(Monitor *mon, const QDict *qdict); +void hmp_savevm(Monitor *mon, const QDict *qdict); int load_vmstate(const char *name); -void do_delvm(Monitor *mon, const QDict *qdict); +void hmp_delvm(Monitor *mon, const QDict *qdict); void do_info_snapshots(Monitor *mon, const QDict *qdict); void qemu_announce_self(void); @@ -175,16 +175,16 @@ extern const char *prom_envs[MAX_PROM_ENVS]; extern unsigned int nb_prom_envs; /* pci-hotplug */ -void pci_device_hot_add(Monitor *mon, const QDict *qdict); +void hmp_pci_add(Monitor *mon, const QDict *qdict); int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo); -void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict); +void hmp_pci_del(Monitor *mon, const QDict *qdict); /* generic hotplug */ -void drive_hot_add(Monitor *mon, const QDict *qdict); +void hmp_drive_add(Monitor *mon, const QDict *qdict); /* pcie aer error injection */ void pcie_aer_inject_error_print(Monitor *mon, const QObject *data); -int do_pcie_aer_inject_error(Monitor *mon, +int hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict, QObject **ret_data); /* serial ports */ @@ -199,8 +199,8 @@ extern CharDriverState *serial_hds[MAX_SERIAL_PORTS]; extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS]; -void do_usb_add(Monitor *mon, const QDict *qdict); -void do_usb_del(Monitor *mon, const QDict *qdict); +void hmp_usb_add(Monitor *mon, const QDict *qdict); +void hmp_usb_del(Monitor *mon, const QDict *qdict); void usb_info(Monitor *mon, const QDict *qdict); void add_boot_device_path(int32_t bootindex, DeviceState *dev, diff --git a/include/ui/console.h b/include/ui/console.h index 8a4d671..de88bba 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -56,7 +56,7 @@ struct MouseTransformInfo { int a[7]; }; -void do_mouse_set(Monitor *mon, const QDict *qdict); +void hmp_mouse_set(Monitor *mon, const QDict *qdict); /* keysym is a unicode code except for special keys (see QEMU_KEY_xxx constants) */ -- cgit v1.1 From 1ce6be24df0a2f634b61b9b882ac6d10af485ad6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 6 Feb 2015 14:18:24 +0100 Subject: hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() Some are called do_info_SUBCOMMAND() (old ones, usually), some hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND pointlessly differs in spelling. Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the subcommand name with '-' replaced by '_'. Exceptions: * sun4m_irq_info(), sun4m_pic_info() renamed to sun4m_hmp_info_irq(), sun4m_hmp_info_pic(). * lm32_irq_info(), lm32_pic_info() renamed to lm32_hmp_info_irq(), lm32_hmp_info_pic(). Signed-off-by: Markus Armbruster --- include/hw/i386/pc.h | 4 ++-- include/hw/lm32/lm32_pic.h | 4 ++-- include/hw/loader.h | 2 +- include/hw/sparc/sun4m.h | 4 ++-- include/hw/usb.h | 2 +- include/monitor/qdev.h | 4 ++-- include/net/net.h | 2 +- include/net/slirp.h | 2 +- include/sysemu/sysemu.h | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 69d9cf8..dddd255 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -136,8 +136,8 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq); qemu_irq *kvm_i8259_init(ISABus *bus); int pic_read_irq(DeviceState *d); int pic_get_output(DeviceState *d); -void pic_info(Monitor *mon, const QDict *qdict); -void irq_info(Monitor *mon, const QDict *qdict); +void hmp_info_pic(Monitor *mon, const QDict *qdict); +void hmp_info_irq(Monitor *mon, const QDict *qdict); /* Global System Interrupts */ diff --git a/include/hw/lm32/lm32_pic.h b/include/hw/lm32/lm32_pic.h index 5556803..189fa38 100644 --- a/include/hw/lm32/lm32_pic.h +++ b/include/hw/lm32/lm32_pic.h @@ -8,7 +8,7 @@ uint32_t lm32_pic_get_im(DeviceState *d); void lm32_pic_set_ip(DeviceState *d, uint32_t ip); void lm32_pic_set_im(DeviceState *d, uint32_t im); -void lm32_do_pic_info(Monitor *mon, const QDict *qdict); -void lm32_irq_info(Monitor *mon, const QDict *qdict); +void lm32_hmp_info_pic(Monitor *mon, const QDict *qdict); +void lm32_hmp_info_irq(Monitor *mon, const QDict *qdict); #endif /* QEMU_HW_LM32_PIC_H */ diff --git a/include/hw/loader.h b/include/hw/loader.h index 8593045..4f0681b 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -78,7 +78,7 @@ void rom_load_done(void); void rom_set_fw(FWCfgState *f); int rom_copy(uint8_t *dest, hwaddr addr, size_t size); void *rom_ptr(hwaddr addr); -void do_info_roms(Monitor *mon, const QDict *qdict); +void hmp_info_roms(Monitor *mon, const QDict *qdict); #define rom_add_file_fixed(_f, _a, _i) \ rom_add_file(_f, NULL, _a, _i, false) diff --git a/include/hw/sparc/sun4m.h b/include/hw/sparc/sun4m.h index a587700..9c17425 100644 --- a/include/hw/sparc/sun4m.h +++ b/include/hw/sparc/sun4m.h @@ -29,8 +29,8 @@ void slavio_pic_info(Monitor *mon, DeviceState *dev); void slavio_irq_info(Monitor *mon, DeviceState *dev); /* sun4m.c */ -void sun4m_pic_info(Monitor *mon, const QDict *qdict); -void sun4m_irq_info(Monitor *mon, const QDict *qdict); +void sun4m_hmp_info_pic(Monitor *mon, const QDict *qdict); +void sun4m_hmp_info_irq(Monitor *mon, const QDict *qdict); /* sparc32_dma.c */ #include "hw/sparc/sparc32_dma.h" diff --git a/include/hw/usb.h b/include/hw/usb.h index b20b959..e6dfb87 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -473,7 +473,7 @@ int set_usb_string(uint8_t *buf, const char *str); /* usb-linux.c */ USBDevice *usb_host_device_open(USBBus *bus, const char *devname); -void usb_host_info(Monitor *mon, const QDict *qdict); +void hmp_info_usbhost(Monitor *mon, const QDict *qdict); /* usb ports of the VM */ diff --git a/include/monitor/qdev.h b/include/monitor/qdev.h index 8d16e11..5eb4a11 100644 --- a/include/monitor/qdev.h +++ b/include/monitor/qdev.h @@ -6,8 +6,8 @@ /*** monitor commands ***/ -void do_info_qtree(Monitor *mon, const QDict *qdict); -void do_info_qdm(Monitor *mon, const QDict *qdict); +void hmp_info_qtree(Monitor *mon, const QDict *qdict); +void hmp_info_qdm(Monitor *mon, const QDict *qdict); int do_device_add(Monitor *mon, const QDict *qdict, QObject **ret_data); int qdev_device_help(QemuOpts *opts); DeviceState *qdev_device_add(QemuOpts *opts); diff --git a/include/net/net.h b/include/net/net.h index ac43a8e..50ffcb9 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -156,7 +156,7 @@ ssize_t qemu_deliver_packet_iov(NetClientState *sender, void *opaque); void print_net_client(Monitor *mon, NetClientState *nc); -void do_info_network(Monitor *mon, const QDict *qdict); +void hmp_info_network(Monitor *mon, const QDict *qdict); /* NIC info */ diff --git a/include/net/slirp.h b/include/net/slirp.h index d3b64f6..64b795c 100644 --- a/include/net/slirp.h +++ b/include/net/slirp.h @@ -40,7 +40,7 @@ int net_slirp_parse_legacy(QemuOptsList *opts_list, const char *optarg, int *ret int net_slirp_smb(const char *exported_dir); -void do_info_usernet(Monitor *mon, const QDict *qdict); +void hmp_info_usernet(Monitor *mon, const QDict *qdict); #endif diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index d132430..1ab7063 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -77,7 +77,7 @@ void qemu_add_machine_init_done_notifier(Notifier *notify); void hmp_savevm(Monitor *mon, const QDict *qdict); int load_vmstate(const char *name); void hmp_delvm(Monitor *mon, const QDict *qdict); -void do_info_snapshots(Monitor *mon, const QDict *qdict); +void hmp_info_snapshots(Monitor *mon, const QDict *qdict); void qemu_announce_self(void); @@ -201,7 +201,7 @@ extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS]; void hmp_usb_add(Monitor *mon, const QDict *qdict); void hmp_usb_del(Monitor *mon, const QDict *qdict); -void usb_info(Monitor *mon, const QDict *qdict); +void hmp_info_usb(Monitor *mon, const QDict *qdict); void add_boot_device_path(int32_t bootindex, DeviceState *dev, const char *suffix); -- cgit v1.1