Re: [libvirt] [PATCH 1/2] Introduce virDomainYesNo enum type

2014-07-15 Thread Daniel P. Berrange
On Mon, Jul 14, 2014 at 10:58:27AM -0600, Eric Blake wrote: On 07/14/2014 10:40 AM, Daniel P. Berrange wrote: } -def-os.bios.useserial = VIR_DOMAIN_BIOS_USESERIAL_YES; +def-os.bios.useserial = VIR_DOMAIN_YES_NO_ENABLED; } else { -

Re: [libvirt] [PATCH 1/2] Introduce virDomainYesNo enum type

2014-07-15 Thread Ján Tomko
On 07/14/2014 06:58 PM, Eric Blake wrote: On 07/14/2014 10:40 AM, Daniel P. Berrange wrote: } -def-os.bios.useserial = VIR_DOMAIN_BIOS_USESERIAL_YES; +def-os.bios.useserial = VIR_DOMAIN_YES_NO_ENABLED; } else { -

Re: [libvirt] [PATCH 1/2] Introduce virDomainYesNo enum type

2014-07-15 Thread Eric Blake
On 07/15/2014 04:41 AM, Ján Tomko wrote: Is it just a matter of coming up with a better name? Maybe: VIR_TRISTATE_ABSENT = 0, VIR_TRISTATE_NO, VIR_TRISTATE_YES, Without the DOMAIN prefix, this could be used for network_conf.c too. How about: VIR_TRISTATE_SWITCH_ABSENT = 0,

Re: [libvirt] [PATCH 1/2] Introduce virDomainYesNo enum type

2014-07-14 Thread Daniel P. Berrange
On Mon, Jul 14, 2014 at 04:47:16PM +0200, Ján Tomko wrote: @@ -10901,9 +10884,9 @@ virDomainDefParseBootXML(xmlXPathContextPtr ctxt, for useserial)); goto cleanup; } -def-os.bios.useserial =

[libvirt] [PATCH 1/2] Introduce virDomainYesNo enum type

2014-07-14 Thread Ján Tomko
Replace all three-state (default/yes/no) enums with it: virDomainBootMenu virDomainPMState virDomainGraphicsSpiceClipboardCopypaste virDomainGraphicsSpiceAgentFileTransfer --- src/conf/domain_conf.c | 54 ++-- src/conf/domain_conf.h | 45

Re: [libvirt] [PATCH 1/2] Introduce virDomainYesNo enum type

2014-07-14 Thread Eric Blake
On 07/14/2014 08:56 AM, Daniel P. Berrange wrote: On Mon, Jul 14, 2014 at 04:47:16PM +0200, Ján Tomko wrote: @@ -10901,9 +10884,9 @@ virDomainDefParseBootXML(xmlXPathContextPtr ctxt, for useserial)); goto cleanup; } -

Re: [libvirt] [PATCH 1/2] Introduce virDomainYesNo enum type

2014-07-14 Thread Daniel P. Berrange
On Mon, Jul 14, 2014 at 10:38:01AM -0600, Eric Blake wrote: On 07/14/2014 08:56 AM, Daniel P. Berrange wrote: On Mon, Jul 14, 2014 at 04:47:16PM +0200, Ján Tomko wrote: @@ -10901,9 +10884,9 @@ virDomainDefParseBootXML(xmlXPathContextPtr ctxt, for

Re: [libvirt] [PATCH 1/2] Introduce virDomainYesNo enum type

2014-07-14 Thread Eric Blake
On 07/14/2014 10:40 AM, Daniel P. Berrange wrote: } -def-os.bios.useserial = VIR_DOMAIN_BIOS_USESERIAL_YES; +def-os.bios.useserial = VIR_DOMAIN_YES_NO_ENABLED; } else { -def-os.bios.useserial = VIR_DOMAIN_BIOS_USESERIAL_NO; +