On Mon, Apr 07, 2025 at 15:45:24 +0200, Michal Prívozník wrote: > On 4/7/25 15:11, Peter Krempa via Devel wrote: > > On Mon, Apr 07, 2025 at 14:49:14 +0200, Peter Krempa via Devel wrote: > >> On Mon, Apr 07, 2025 at 14:25:43 +0200, Kirill Shchetiniuk via Devel wrote:
[...] > >> Either way this hunk is incorrect as this flag should not get here and > >> the caller needs to be fixed. > > > > If in fact you meant to mask out VIR_VOL_XML_PARSE_VALIDATE here > > Yeah, that was the initial plan. > > > I > > suggest you rather accept it in the virCheckFlags inside the parser code > > rather than masking it out. > > > > Well, I was the one who suggested to Kirill to mask the flag out. > Accepting the flag inside a function and then never using it just felt > wrong. Well there certainly are cases where we do accept a somewhat "useless" flag. Examples are e.g. VIR_TYPED_PARAM_STRING_OKAY in some of the APIs and VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC which is now pointless as we deleted the non-atomic snapshot code. My stance is that 'virCheckFlags' means "Following code handles $FLAGS properly."