diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-02 17:09:39 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-03 15:47:48 +0200 |
commit | f37c6c2e89d3b8d3376ddc74b5357e56f49ccb9c (patch) | |
tree | 03cd02d855cdd08cfe118ae9dc285121aca29abc /include | |
parent | a0d645100eba45a96f009528ec0fec14b4b35956 (diff) |
monitor: remove MonitorDef from typedefs.h
MonitorDef is defined by hmp-target.h, and all users except one already
include it; the reason why the stubs do not include it, is because
hmp-target.h currently can only be used in files that are compiled
per target. However, that is easily fixed. Because the benefit of
having MonitorDef in typedefs.h is very small, do it and remove the
type from typedefs.h.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/monitor/hmp-target.h | 11 | ||||
-rw-r--r-- | include/qemu/typedefs.h | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h index d78e979f05..b679aaebbf 100644 --- a/include/monitor/hmp-target.h +++ b/include/monitor/hmp-target.h @@ -25,11 +25,10 @@ #ifndef MONITOR_HMP_TARGET_H #define MONITOR_HMP_TARGET_H -#include "cpu.h" - -#define MD_TLONG 0 -#define MD_I32 1 +typedef struct MonitorDef MonitorDef; +#ifdef COMPILING_PER_TARGET +#include "cpu.h" struct MonitorDef { const char *name; int offset; @@ -37,6 +36,10 @@ struct MonitorDef { int val); int type; }; +#endif + +#define MD_TLONG 0 +#define MD_I32 1 const MonitorDef *target_monitor_defs(void); int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval); diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 2b1948a19a..b71a36d02b 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -75,7 +75,6 @@ typedef struct MemoryRegionSection MemoryRegionSection; typedef struct MigrationIncomingState MigrationIncomingState; typedef struct MigrationState MigrationState; typedef struct Monitor Monitor; -typedef struct MonitorDef MonitorDef; typedef struct MSIMessage MSIMessage; typedef struct NetClientState NetClientState; typedef struct NetFilterState NetFilterState; |