Re: [Qemu-devel] [RFC] New API for asynchronous monitor commands

2010-01-25 Thread Luiz Capitulino
On Sun, 24 Jan 2010 08:01:28 -0600 Anthony Liguori wrote: > On 01/24/2010 04:59 AM, Avi Kivity wrote: > > On 01/22/2010 09:03 PM, Adam Litke wrote: > >> > >> +static void do_async_cmd_handler(Monitor *mon, const mon_cmd_t *cmd, > >> + const QDict *params) > >> +{ >

Re: [Qemu-devel] [RFC] New API for asynchronous monitor commands

2010-01-24 Thread Avi Kivity
On 01/24/2010 04:01 PM, Anthony Liguori wrote: Instead of sending opaques everywhere (and having them correspond to different types in different cases), I would prefer it if the handle always accepted an AsyncCommandCompletion *. That makes it easier to follow the code, since there are no opaq

Re: [Qemu-devel] [RFC] New API for asynchronous monitor commands

2010-01-24 Thread Anthony Liguori
On 01/24/2010 04:59 AM, Avi Kivity wrote: On 01/22/2010 09:03 PM, Adam Litke wrote: +static void do_async_cmd_handler(Monitor *mon, const mon_cmd_t *cmd, + const QDict *params) +{ +if (monitor_ctrl_mode(mon)) { +cmd->mhandler.cmd_async(mon, params, qm

Re: [Qemu-devel] [RFC] New API for asynchronous monitor commands

2010-01-24 Thread Avi Kivity
On 01/22/2010 09:03 PM, Adam Litke wrote: +static void do_async_cmd_handler(Monitor *mon, const mon_cmd_t *cmd, + const QDict *params) +{ +if (monitor_ctrl_mode(mon)) { +cmd->mhandler.cmd_async(mon, params, qmp_monitor_complete, mon); +} else { +