[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 15/23] monitor: Establish cmd flags and convert t
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH v4 15/23] monitor: Establish cmd flags and convert the async tag |
Date: |
Wed, 16 Jun 2010 00:38:39 +0200 |
From: Jan Kiszka <address@hidden>
As we want to add more flags to monitor commands, convert the only so
far existing one accordingly.
Signed-off-by: Jan Kiszka <address@hidden>
---
monitor.c | 6 +++---
monitor.h | 3 +++
qemu-monitor.hx | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/monitor.c b/monitor.c
index aa0bdd6..2d3d70d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -118,7 +118,7 @@ typedef struct mon_cmd_t {
int (*cmd_async)(Monitor *mon, const QDict *params,
MonitorCompletion *cb, void *opaque);
} mhandler;
- int async;
+ int flags;
} mon_cmd_t;
/* file descriptors passed via SCM_RIGHTS */
@@ -340,7 +340,7 @@ static inline int monitor_handler_ported(const mon_cmd_t
*cmd)
static inline bool monitor_handler_is_async(const mon_cmd_t *cmd)
{
- return cmd->async != 0;
+ return cmd->flags & MONITOR_CMD_ASYNC;
}
static inline int monitor_has_error(const Monitor *mon)
@@ -2544,7 +2544,7 @@ static const mon_cmd_t info_cmds[] = {
.help = "show balloon information",
.user_print = monitor_print_balloon,
.mhandler.info_async = do_info_balloon,
- .async = 1,
+ .flags = MONITOR_CMD_ASYNC,
},
{
.name = "qtree",
diff --git a/monitor.h b/monitor.h
index 32c0170..e3f0119 100644
--- a/monitor.h
+++ b/monitor.h
@@ -15,6 +15,9 @@ extern Monitor *default_mon;
#define MONITOR_USE_READLINE 0x02
#define MONITOR_USE_CONTROL 0x04
+/* flags for monitor commands */
+#define MONITOR_CMD_ASYNC 0x0001
+
/* QMP events */
typedef enum MonitorEvent {
QEVENT_SHUTDOWN,
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 0034fed..2fe5ae8 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -1287,7 +1287,7 @@ ETEXI
.help = "request VM to change its memory allocation (in MB)",
.user_print = monitor_user_noop,
.mhandler.cmd_async = do_balloon,
- .async = 1,
+ .flags = MONITOR_CMD_ASYNC,
},
STEXI
--
1.6.0.2
- [Qemu-devel] [PATCH v4 13/23] monitor: Allow to specify HMP-specifc command arguments, (continued)
- [Qemu-devel] [PATCH v4 13/23] monitor: Allow to specify HMP-specifc command arguments, Jan Kiszka, 2010/06/15
- [Qemu-devel] [PATCH v4 11/23] monitor: Add completion support for option lists, Jan Kiszka, 2010/06/15
- Re: [Qemu-devel] [PATCH v4 11/23] monitor: Add completion support for option lists, Markus Armbruster, 2010/06/23
- Re: [Qemu-devel] [PATCH v4 11/23] monitor: Add completion support for option lists, Jan Kiszka, 2010/06/23
- Re: [Qemu-devel] [PATCH v4 11/23] monitor: Add completion support for option lists, Markus Armbruster, 2010/06/23
- Re: [Qemu-devel] [PATCH v4 11/23] monitor: Add completion support for option lists, Luiz Capitulino, 2010/06/28
- Re: [Qemu-devel] [PATCH v4 11/23] monitor: Add completion support for option lists, Jan Kiszka, 2010/06/28
- Re: [Qemu-devel] [PATCH v4 11/23] monitor: Add completion support for option lists, Luiz Capitulino, 2010/06/28
- [Qemu-devel] [PATCH] monitor: Allow to exclude commands from QMP, Jan Kiszka, 2010/06/28
[Qemu-devel] [PATCH v4 15/23] monitor: Establish cmd flags and convert the async tag,
Jan Kiszka <=
[Qemu-devel] [PATCH v4 16/23] monitor: Allow to exclude commands from QMP, Jan Kiszka, 2010/06/15
[Qemu-devel] [PATCH v4 14/23] monitor: return length of printed string via monitor_[v]printf, Jan Kiszka, 2010/06/15
[Qemu-devel] [PATCH v4 17/23] Add base64 encoder/decoder, Jan Kiszka, 2010/06/15
[Qemu-devel] [PATCH v4 21/23] QMP: Teach basic capability negotiation to python example, Jan Kiszka, 2010/06/15
[Qemu-devel] [PATCH v4 12/23] monitor: Add completion for qdev paths, Jan Kiszka, 2010/06/15
[Qemu-devel] [PATCH v4 19/23] QMP: Add QBuffer, Jan Kiszka, 2010/06/15
[Qemu-devel] [PATCH v4 18/23] QMP: Reserve namespace for complex object classes, Jan Kiszka, 2010/06/15
[Qemu-devel] [PATCH v4 22/23] QMP: Fix python helper /wrt long return strings, Jan Kiszka, 2010/06/15