conf: Rename virCPUDefUpdateFeatureInternal

The function is supposed to add a feature to a CPU definition, let's
name it virCPUDefAddFeatureInternal. The behavior in case the feature is
already present in the CPU def is configurable and we will soon add a
new option to not do anything in that case, which wouldn't really work
well with the current *Update* name.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
Jiri Denemark 2020-11-19 18:24:01 +01:00
parent ce8fb26a66
commit f06bb04549

View File

@ -858,10 +858,10 @@ virCPUDefFormatBuf(virBufferPtr buf,
} }
static int static int
virCPUDefUpdateFeatureInternal(virCPUDefPtr def, virCPUDefAddFeatureInternal(virCPUDefPtr def,
const char *name, const char *name,
int policy, int policy,
bool update) bool update)
{ {
virCPUFeatureDefPtr feat; virCPUFeatureDefPtr feat;
@ -898,7 +898,7 @@ virCPUDefUpdateFeature(virCPUDefPtr def,
const char *name, const char *name,
int policy) int policy)
{ {
return virCPUDefUpdateFeatureInternal(def, name, policy, true); return virCPUDefAddFeatureInternal(def, name, policy, true);
} }
int int
@ -906,7 +906,7 @@ virCPUDefAddFeature(virCPUDefPtr def,
const char *name, const char *name,
int policy) int policy)
{ {
return virCPUDefUpdateFeatureInternal(def, name, policy, false); return virCPUDefAddFeatureInternal(def, name, policy, false);
} }