mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
monitor: Create monitor-internal.h with common definitions
Before we can split monitor/misc.c, we need to create a header file that contains the common definitions that will be used by multiple source files. For a start, add the type definitions for Monitor, MonitorHMP and MonitorQMP and their dependencies. We'll add functions as needed when splitting monitor/misc.c. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190613153405.24769-10-kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Header guard symbol tidied up, superfluous #include dropped, FIXME in hmp_change() resolved] Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
committed by
Markus Armbruster
parent
f1b3ccfaa6
commit
5bce308aaa
@@ -24,7 +24,7 @@
|
||||
#include "qemu/option.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "qemu/sockets.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "monitor/monitor-internal.h"
|
||||
#include "monitor/qdev.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/opts-visitor.h"
|
||||
@@ -1943,8 +1943,7 @@ static void hmp_change_read_arg(void *opaque, const char *password,
|
||||
|
||||
void hmp_change(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
/* FIXME Make MonitorHMP public and use container_of */
|
||||
MonitorHMP *hmp_mon = (MonitorHMP *)mon;
|
||||
MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
|
||||
const char *device = qdict_get_str(qdict, "device");
|
||||
const char *target = qdict_get_str(qdict, "target");
|
||||
const char *arg = qdict_get_try_str(qdict, "arg");
|
||||
|
||||
Reference in New Issue
Block a user