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 */
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)
.help = "show balloon information",
.user_print = monitor_print_balloon,
.mhandler.info_async = do_info_balloon,
- .async = 1,
+ .flags = MONITOR_CMD_ASYNC,
},
{
.name = "qtree",
#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,
.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