Re: [Qemu-devel] [PATCH 10/22] qapi: add core QMP server support

2011-03-07 Thread Anthony Liguori
On 03/07/2011 07:46 AM, Daniel P. Berrange wrote: On Mon, Mar 07, 2011 at 07:39:41AM -0600, Anthony Liguori wrote: On 03/07/2011 07:09 AM, Stefan Hajnoczi wrote: On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori wrote: +char *qobject_as_string(QObject *obj) +{ +char buffe

Re: [Qemu-devel] [PATCH 10/22] qapi: add core QMP server support

2011-03-07 Thread Daniel P. Berrange
On Mon, Mar 07, 2011 at 07:39:41AM -0600, Anthony Liguori wrote: > On 03/07/2011 07:09 AM, Stefan Hajnoczi wrote: > >On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori wrote: > >>+char *qobject_as_string(QObject *obj) > >>+{ > >>+char buffer[1024]; > >>+ > >>+switch (qobject_type(obj)) { > >>

Re: [Qemu-devel] [PATCH 10/22] qapi: add core QMP server support

2011-03-07 Thread Anthony Liguori
On 03/07/2011 07:09 AM, Stefan Hajnoczi wrote: On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori wrote: +char *qobject_as_string(QObject *obj) +{ +char buffer[1024]; + +switch (qobject_type(obj)) { +case QTYPE_QINT: +snprintf(buffer, sizeof(buffer), "%" PRId64, +

Re: [Qemu-devel] [PATCH 10/22] qapi: add core QMP server support

2011-03-07 Thread Stefan Hajnoczi
On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori wrote: > +char *qobject_as_string(QObject *obj) > +{ > +    char buffer[1024]; > + > +    switch (qobject_type(obj)) { > +    case QTYPE_QINT: > +        snprintf(buffer, sizeof(buffer), "%" PRId64, > +                 qint_get_int(qobject_to_qint(ob

[Qemu-devel] [PATCH 10/22] qapi: add core QMP server support

2011-03-06 Thread Anthony Liguori
This is the infrastructure to register commands. Signed-off-by: Anthony Liguori diff --git a/Makefile.objs b/Makefile.objs index f51eab3..dbdce3c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -103,6 +103,7 @@ common-obj-y += block-migration.o common-obj-y += pflib.o common-obj-y += bitmap.