mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:56:38 +00:00
monitor: Extract completion declarations to 'monitor/hmp-completion.h'
Many files include "monitor/hmp.h", but few of them really need the completion declarations: move them to a distinct header. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20260320160811.28611-2-philmd@linaro.org>
This commit is contained in:
@@ -3403,6 +3403,8 @@ F: monitor/monitor.c
|
||||
F: monitor/hmp*
|
||||
F: hmp.h
|
||||
F: hmp-commands*.hx
|
||||
F: include/monitor/hmp.h
|
||||
F: include/monitor/hmp-completion.h
|
||||
F: include/monitor/hmp-target.h
|
||||
F: tests/qtest/test-hmp.c
|
||||
F: include/qemu/qemu-print.h
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "chardev/char.h"
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/hmp-completion.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-commands-char.h"
|
||||
|
||||
40
include/monitor/hmp-completion.h
Normal file
40
include/monitor/hmp-completion.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Human Monitor Completion handlers
|
||||
*
|
||||
* Copyright IBM, Corp. 2011
|
||||
*
|
||||
* Authors:
|
||||
* Anthony Liguori <aliguori@us.ibm.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef HMP_COMPLETION_H
|
||||
#define HMP_COMPLETION_H
|
||||
|
||||
#include "qemu/readline.h"
|
||||
|
||||
void object_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void object_del_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void device_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void device_del_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void sendkey_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void chardev_remove_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void chardev_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void set_link_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void netdev_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void netdev_del_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void ringbuf_write_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void info_trace_events_completion(ReadLineState *rs, int nb_args,
|
||||
const char *str);
|
||||
void trace_event_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void watchdog_action_completion(ReadLineState *rs, int nb_args,
|
||||
const char *str);
|
||||
void migrate_set_capability_completion(ReadLineState *rs, int nb_args,
|
||||
const char *str);
|
||||
void migrate_set_parameter_completion(ReadLineState *rs, int nb_args,
|
||||
const char *str);
|
||||
void delvm_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void loadvm_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
|
||||
#endif
|
||||
@@ -114,27 +114,6 @@ void hmp_vhost_queue_status(Monitor *mon, const QDict *qdict);
|
||||
void hmp_virtio_queue_element(Monitor *mon, const QDict *qdict);
|
||||
void hmp_xen_event_inject(Monitor *mon, const QDict *qdict);
|
||||
void hmp_xen_event_list(Monitor *mon, const QDict *qdict);
|
||||
void object_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void object_del_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void device_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void device_del_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void sendkey_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void chardev_remove_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void chardev_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void set_link_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void netdev_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void netdev_del_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void ringbuf_write_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void info_trace_events_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void trace_event_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void watchdog_action_completion(ReadLineState *rs, int nb_args,
|
||||
const char *str);
|
||||
void migrate_set_capability_completion(ReadLineState *rs, int nb_args,
|
||||
const char *str);
|
||||
void migrate_set_parameter_completion(ReadLineState *rs, int nb_args,
|
||||
const char *str);
|
||||
void delvm_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void loadvm_completion(ReadLineState *rs, int nb_args, const char *str);
|
||||
void hmp_rocker(Monitor *mon, const QDict *qdict);
|
||||
void hmp_rocker_ports(Monitor *mon, const QDict *qdict);
|
||||
void hmp_rocker_of_dpa_flows(Monitor *mon, const QDict *qdict);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "block/qapi.h"
|
||||
#include "migration/snapshot.h"
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/hmp-completion.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-commands-migration.h"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "system/device_tree.h"
|
||||
#include "monitor/hmp-target.h"
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/hmp-completion.h"
|
||||
#include "block/block-hmp-cmds.h"
|
||||
#include "qapi/qapi-commands-control.h"
|
||||
#include "qapi/qapi-commands-misc.h"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "migration/misc.h"
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/hmp-completion.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "net/net.h"
|
||||
#include "net/hub.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/core/qdev.h"
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/hmp-completion.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-commands-qom.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/core/sysbus.h"
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/hmp-completion.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "monitor/qdev.h"
|
||||
#include "system/arch_init.h"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/hmp-completion.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-commands-run-state.h"
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/hmp-completion.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-commands-trace.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <spice/enums.h>
|
||||
#endif
|
||||
#include "monitor/hmp.h"
|
||||
#include "monitor/hmp-completion.h"
|
||||
#include "monitor/monitor-internal.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-commands-ui.h"
|
||||
|
||||
Reference in New Issue
Block a user