On Wed, May 31, 2017 at 5:23 PM Markus Armbruster <arm...@redhat.com> wrote:
> Marc-André Lureau <marcandre.lur...@gmail.com> writes: > > > On Thu, May 18, 2017 at 4:58 PM Markus Armbruster <arm...@redhat.com> > wrote: > > > >> Marc-André Lureau <marcandre.lur...@redhat.com> writes: > >> > >> > Use a more specific bool type. > >> > > >> > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > >> > >> Why doesn't this run afoul backward compatibility? To answer the > >> question, we need to enumerate affected external interfaces. > >> > >> > > Right, this will break if we have users such as: > > > > -global PIIX4_PM.disable_s3=2 > > > > With this change, it will now error with: > > > > qemu-system-x86_64: can't apply global PIIX4_PM.disable_s3=2: Invalid > > parameter type for 'disable_s3', expected: boolean > > > > Acceptable? otherwise, I drop the patch > > Quick grep through libvirt... aha, src/qemu_command.c: > > if (def->pm.s3) { > const char *pm_object = "PIIX4_PM"; > > if (qemuDomainIsQ35(def) && > virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_DISABLE_S3)) { > pm_object = "ICH9-LPC"; > } else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX_DISABLE_S3)) { > virReportError(VIR_ERR_CONFIG_UNSUPPORTED, > "%s", _("setting ACPI S3 not supported")); > return -1; > } > > virCommandAddArg(cmd, "-global"); > virCommandAddArgFormat(cmd, "%s.disable_s3=%d", > pm_object, def->pm.s3 == > VIR_TRISTATE_BOOL_NO); > } > > We need to keep at least disable_s3=0 and disable_s3=1 working. Let's > drop the patch from this series. > Ah crap, I thought 0 and 1 where acceptable bool values, it's not the case.. -- Marc-André Lureau