On Thu, Jan 18, 2018 at 17:04:42 +0100, Michal Privoznik wrote: > We need to keep track of spawned processes so that we can kill > them when qemu process dies. > > Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> > --- > src/qemu/qemu_domain.c | 130 +++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 130 insertions(+) > > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c > index 97996b053..4079165f9 100644 > --- a/src/qemu/qemu_domain.c > +++ b/src/qemu/qemu_domain.c > @@ -131,6 +131,10 @@ static virClassPtr qemuDomainSaveCookieClass; > static void qemuDomainLogContextDispose(void *obj); > static void qemuDomainSaveCookieDispose(void *obj); > > +static void > +qemuDomainDiskPRObjectHashFree(void *payload, > + const void *name); > + > static int > qemuDomainOnceInit(void) > { > @@ -1954,6 +1958,46 @@ qemuDomainObjPrivateXMLFormatAllowReboot(virBufferPtr buf, > } > > > +static int > +qemuDomainObjPrivateXMLFormatOnePR(void *payload, > + const void *name, > + void *data) > +{ > + qemuDomainDiskPRObjectPtr prObj = payload; > + virBufferPtr buf = data; > + > + virBufferAddLit(buf, "<manager>\n"); > + virBufferAdjustIndent(buf, 2); > + virBufferAsprintf(buf, "<alias>%s</alias>\n", (const char *) name); > + virBufferAsprintf(buf, "<managed>%s</managed>\n", > + virTristateBoolTypeToString(virTristateBoolFromBool(prObj->managed))); > + virBufferEscapeString(buf, "<path>%s</path>\n", prObj->path); > + virBufferAsprintf(buf, "<pid>%lld</pid>\n", (long long) prObj->pid); You don't really need any of this data for the unmanaged ones and need the PID and path for the managed manager. So this will also need some tweaking.
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list