Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Andrea Bolognani
On Thu, Mar 24, 2022 at 12:42:12PM +0100, Peter Krempa wrote: > On Thu, Mar 24, 2022 at 12:02:05 +0100, Martin Kletzander wrote: > > On Thu, Mar 24, 2022 at 10:32:51AM +, Andrea Bolognani wrote: > > > On Thu, Mar 24, 2022 at 09:58:28AM +0100, Martin Kletzander wrote: > > > > I would rather

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Peter Krempa
On Thu, Mar 24, 2022 at 12:02:05 +0100, Martin Kletzander wrote: > On Thu, Mar 24, 2022 at 10:32:51AM +, Andrea Bolognani wrote: > > On Thu, Mar 24, 2022 at 09:58:28AM +0100, Martin Kletzander wrote: > > > What I assume is that allowReboot is one of the few, if not the only > > > exception

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Peter Krempa
On Thu, Mar 24, 2022 at 10:03:36 +, Andrea Bolognani wrote: > On Thu, Mar 24, 2022 at 10:14:18AM +0100, Michal Prívozník wrote: > > On 3/24/22 10:00, Peter Krempa wrote: > > > On Wed, Mar 23, 2022 at 19:04:20 +0100, Andrea Bolognani wrote: > > >> Fixes: 8861d96c880d25c940456c5997a2ac93fc073c78

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Martin Kletzander
On Thu, Mar 24, 2022 at 10:32:51AM +, Andrea Bolognani wrote: On Thu, Mar 24, 2022 at 09:58:28AM +0100, Martin Kletzander wrote: What I assume is that allowReboot is one of the few, if not the only exception where we format the default zero value. My guess is that you're right, but I

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Andrea Bolognani
On Thu, Mar 24, 2022 at 09:58:28AM +0100, Martin Kletzander wrote: > What I assume is that allowReboot is one of the few, if not the only > exception where we format the default zero value. My guess is that you're right, but I haven't actually verified this yet :) > > @@ -545,8 +545,6 @@

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Andrea Bolognani
On Thu, Mar 24, 2022 at 10:14:18AM +0100, Michal Prívozník wrote: > On 3/24/22 10:00, Peter Krempa wrote: > > On Wed, Mar 23, 2022 at 19:04:20 +0100, Andrea Bolognani wrote: > >> Fixes: 8861d96c880d25c940456c5997a2ac93fc073c78 > >> Fixes: c8726ede83ac117cb18c0b0a1fbfeeac8b80384b > > I wouldn't say

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Michal Prívozník
On 3/24/22 10:00, Peter Krempa wrote: > On Wed, Mar 23, 2022 at 19:04:20 +0100, Andrea Bolognani wrote: >> The _ABSENT value of each enumeration has 'default' as string >> representation, and when that's been formatted to XML we should >> parse it back successfully, so we can't just treat

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Peter Krempa
On Wed, Mar 23, 2022 at 19:04:20 +0100, Andrea Bolognani wrote: > The _ABSENT value of each enumeration has 'default' as string > representation, and when that's been formatted to XML we should > parse it back successfully, so we can't just treat encountering > it as an error. > > Callers of

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Martin Kletzander
On Wed, Mar 23, 2022 at 07:04:20PM +0100, Andrea Bolognani wrote: The _ABSENT value of each enumeration has 'default' as string representation, and when that's been formatted to XML we should parse it back successfully, so we can't just treat encountering it as an error. Callers of

[RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-23 Thread Andrea Bolognani
The _ABSENT value of each enumeration has 'default' as string representation, and when that's been formatted to XML we should parse it back successfully, so we can't just treat encountering it as an error. Callers of virXMLPropTristate*() can of course still pass VIR_XML_PROP_NONZERO explicitly