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

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux