From: Cole Robinson Date: Fri, 18 Jan 2019 21:32:22 +0000 (-0500) Subject: conf: net: Rename 'model' to 'modelstr' X-Git-Tag: v5.3.0-rc1~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa3c9f34bfc6ee03b9c66758c181f9f3c048c902;p=thirdparty%2Flibvirt.git conf: net: Rename 'model' to 'modelstr' We will be adding a 'model' enum in upcoming patches. Rename the existing value to make the differentiation clear Acked-by: Michal Privoznik Signed-off-by: Cole Robinson --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 04cc84f986..a0838c14f3 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2325,7 +2325,7 @@ virDomainNetDefClear(virDomainNetDefPtr def) if (!def) return; - VIR_FREE(def->model); + VIR_FREE(def->modelstr); switch (def->type) { case VIR_DOMAIN_NET_TYPE_VHOSTUSER: @@ -11619,7 +11619,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt, _("Model name contains invalid characters")); goto error; } - VIR_STEAL_PTR(def->model, model); + VIR_STEAL_PTR(def->modelstr, model); } switch (def->type) { @@ -21824,10 +21824,10 @@ virDomainNetDefCheckABIStability(virDomainNetDefPtr src, return false; } - if (STRNEQ_NULLABLE(src->model, dst->model)) { + if (STRNEQ_NULLABLE(src->modelstr, dst->modelstr)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Target network card model %s does not match source %s"), - NULLSTR(dst->model), NULLSTR(src->model)); + NULLSTR(dst->modelstr), NULLSTR(src->modelstr)); return false; } @@ -29480,28 +29480,28 @@ virDomainNetGetActualTrustGuestRxFilters(virDomainNetDefPtr iface) const char * virDomainNetGetModelString(const virDomainNetDef *net) { - return net->model; + return net->modelstr; } int virDomainNetSetModelString(virDomainNetDefPtr net, const char *model) { - return VIR_STRDUP(net->model, model); + return VIR_STRDUP(net->modelstr, model); } int virDomainNetStreqModelString(const virDomainNetDef *net, const char *model) { - return STREQ_NULLABLE(net->model, model); + return STREQ_NULLABLE(net->modelstr, model); } int virDomainNetStrcaseeqModelString(const virDomainNetDef *net, const char *model) { - return net->model && STRCASEEQ(net->model, model); + return net->modelstr && STRCASEEQ(net->modelstr, model); } bool diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index c13f9a9ecd..c0dfd74349 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -898,7 +898,7 @@ struct _virDomainNetDef { virDomainNetType type; virMacAddr mac; bool mac_generated; /* true if mac was *just now* auto-generated by libvirt */ - char *model; + char *modelstr; union { struct { virDomainNetBackendType name; /* which driver backend to use */