@@ -172,6 +172,4 @@ extern const VMStateDescription vmstate_mos6522;
uint64_t mos6522_read(void *opaque, hwaddr addr, unsigned size);
void mos6522_write(void *opaque, hwaddr addr, uint64_t val, unsigned size);
-void hmp_info_via(Monitor *mon, const QDict *qdict);
-
#endif /* MOS6522_H */
@@ -53,7 +53,6 @@ void hmp_mce(Monitor *mon, const QDict *qdict);
void hmp_info_local_apic(Monitor *mon, const QDict *qdict);
void hmp_info_sev(Monitor *mon, const QDict *qdict);
void hmp_info_sgx(Monitor *mon, const QDict *qdict);
-void hmp_info_via(Monitor *mon, const QDict *qdict);
void hmp_memory_dump(Monitor *mon, const QDict *qdict);
void hmp_physical_memory_dump(Monitor *mon, const QDict *qdict);
void hmp_info_registers(Monitor *mon, const QDict *qdict);
@@ -29,8 +29,6 @@
#include "hw/misc/mos6522.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
-#include "monitor/monitor.h"
-#include "monitor/hmp.h"
#include "qapi/qapi-commands-machine.h"
#include "qapi/type-helpers.h"
#include "qemu/timer.h"
@@ -587,17 +585,6 @@ HumanReadableText *qmp_x_query_mos6522_devices(Error **errp)
return human_readable_text_from_str(buf);
}
-void hmp_info_via(Monitor *mon, const QDict *qdict)
-{
- Error *err = NULL;
- g_autoptr(HumanReadableText) info = qmp_x_query_mos6522_devices(&err);
-
- if (hmp_handle_error(mon, err)) {
- return;
- }
- monitor_puts(mon, info->human_readable_text);
-}
-
static const MemoryRegionOps mos6522_ops = {
.read = mos6522_read,
.write = mos6522_write,
@@ -873,7 +873,7 @@ ERST
.args_type = "",
.params = "",
.help = "show guest mos6522 VIA devices",
- .cmd = hmp_info_via,
+ .cmd_info_hrt = qmp_x_query_mos6522_devices,
},
#endif
Register the command 'info via' using HMPCommand::cmd_info_hrt(), so it is processed using the generic hmp_info_human_readable_text(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/misc/mos6522.h | 2 -- include/monitor/hmp-target.h | 1 - hw/misc/mos6522.c | 13 ------------- hmp-commands-info.hx | 2 +- 4 files changed, 1 insertion(+), 17 deletions(-)