[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2 23/33] qemu: Use enum for CPU model expansion type



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]