From: Peter Krempa Date: Mon, 9 Sep 2024 14:46:06 +0000 (+0200) Subject: virDomainFeaturesDefParse: Add comment warning about features being specified repeatedly X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3c5839973fba25d3def472a671fa95057c8de497;p=libvirt.git virDomainFeaturesDefParse: Add comment warning about features being specified repeatedly Few of the handlers didn't take that possibility into account. Warn others. Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0f0488f3a2..cf4b1b2aef 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -16849,6 +16849,8 @@ virDomainFeaturesDefParse(virDomainDef *def, return -1; } + /* Beware that users can specify the given feature multiple times, so + * the parser must be able to handle that */ switch ((virDomainFeature) val) { case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: