[libvirt] [PATCH v3] qemu: Make QMP probing process reusable

Pavel Hrdina phrdina at redhat.com
Mon Nov 28 08:01:55 UTC 2016


On Fri, Nov 25, 2016 at 08:07:25PM +0100, Jiri Denemark wrote:
> On Fri, Nov 25, 2016 at 19:56:23 +0100, Jiri Denemark wrote:
> > The code that runs a new QEMU process to be used for probing
> > capabilities is separated into four reusable functions so that any code
> > that wants to probe a QEMU process may just follow a few simple steps:
> > 
> >     cmd = virQEMUCapsInitQMPCommandNew(...);
> > 
> >     mon = virQEMUCapsInitQMPCommandRun(cmd, ...);
> 
> Oops, and this needs to be changed to
> 
>     virQEMUCapsInitQMPCommandRun(cmd);
> 
> > 
> >     /* talk to the running QEMU process using its QMP monitor */
> > 
> >     if (reprobeIsRequired) {
> >         virQEMUCapsInitQMPCommandAbort(cmd, ...);
> >         mon = virQEMUCapsInitQMPCommandRun(cmd, ...);
> 
> And here as well.
> 
> > 
> >         /* talk to the running QEMU process again */
> >     }
> > 
> >     virQEMUCapsInitQMPCommandFree(cmd);

ACK with this fixed :)

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161128/e593078c/attachment-0001.sig>


More information about the libvir-list mailing list