[libvirt] [PATCH 2/2] qemu: allow turning off QEMU guest RAM dump globally

Andrea Bolognani abologna at redhat.com
Thu Aug 18 08:25:43 UTC 2016


On Wed, 2016-08-17 at 17:04 -0400, John Ferlan wrote:
> > @@ -6999,17 +7000,22 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
> >                                virTristateSwitchTypeToString(vmport));
> >          }
> >  
> > -        if (def->mem.dump_core) {
> > -            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE)) {
> > +        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE)) {
> > +            if (def->mem.dump_core) {
> > +                virBufferAsprintf(&buf, ",dump-guest-core=%s",
> > +                                  virTristateSwitchTypeToString(def->mem.dump_core));
> > +            } else if (cfg->dumpGuestCore != true) {
>                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Will this even matter? Since there's a ternary below?  IOW: There's no
> way to set this to "off" and I assume the by not providing it, it's off.
> Maybe the ternary doesn't matter...
> 
> ACK with what appear to be obvious adjustments.

Since this has not been pushed yet, maybe change

  if (cfg->dumpGuestCore != true)

to

  if (!cfg->dumpGuestCore)

before pushing?

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list