[libvirt] [PATCH v2 23/33] qemu: Use enum for CPU model expansion type
Jiri Denemark
jdenemar at redhat.com
Thu Feb 23 12:50:13 UTC 2017
On Tue, Feb 21, 2017 at 22:49:37 -0500, John Ferlan wrote:
...
> > @@ -5043,8 +5044,14 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon,
> > if (virJSONValueObjectAppendString(model, "name", model_name) < 0)
> > goto cleanup;
> >
> > + switch (type) {
> > + case QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC:
> > + typeStr = "static";
> > + break;
> > + }
> > +
>
> This works, but why not use VIR_ENUM_IMPL type logic?
>
> Weak ACK, I think it'd be better to use VIR_ENUM_IMPL.
I explicitly wanted this to be visible in the context, mainly because
two different values are mapped to the same string.
Jirka
More information about the libvir-list
mailing list