]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Make QMP probing process reusable
authorJiri Denemark <jdenemar@redhat.com>
Mon, 22 Jul 2013 17:38:37 +0000 (19:38 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 25 Nov 2016 19:34:26 +0000 (20:34 +0100)
commit4c5d05ea8a8fc2f44210f33e3c6a540a03adc092
tree608955236c8c627143675f3a1b2a26bfabe4d341
parent745263589f9641cd6436561f4dbdce9cd28803c8
qemu: Make QMP probing process reusable

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(...);
    virQEMUCapsInitQMPCommandRun(cmd);

    /* talk to the running QEMU process using its QMP monitor */

    if (reprobeIsRequired) {
        virQEMUCapsInitQMPCommandAbort(cmd, ...);
        virQEMUCapsInitQMPCommandRun(cmd);

        /* talk to the running QEMU process again */
    }

    virQEMUCapsInitQMPCommandFree(cmd);

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_capabilities.c