From patchwork Wed Mar 13 15:51:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 160237 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp14473937jad; Wed, 13 Mar 2019 08:51:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7qymR74vPSwS4LX0tHdBNXUmwcq46grhQjeT42oHXOlNHtZ4eNbaAFwSMDLj16aH0u6RL X-Received: by 2002:aed:234d:: with SMTP id i13mr35614409qtc.367.1552492296995; Wed, 13 Mar 2019 08:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552492296; cv=none; d=google.com; s=arc-20160816; b=n5UhqDhrLQq9+jzk2gyodan2UnBeSuUMjTQbrpreV4xaUzS/qn1d6tzBfHr5HpVHFK b9HT8XMjd/Imh7ACpBZnRpocD17ygLHEP9MTFZ1q3sfVtO6SIsZAN3Pbdj7toC1e6L+j Dh7RXHc8OzitW03S4X/4lH2BfId1IvQ7Kt5RiNqK3M+OYDOM4S1/5wJZJFwvCpUAKmeT ITUBb6gHYx37ddqdNorIch4i6BzW4/zx+7BDI66qGpuKVsBq5a/245GDBf8y9JshNuz5 ud/e5M4DBoyvAg2x1zrlUNw0J1gVgNIXQzh/hBhZXqYy/v8yfnZrV2axpQtOHRR9eBgu D6Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=1QHlQRjvP+yPk7f7vpTWXm093DltjohtwjRS7hxmlYU=; b=BcruvF2xXgL1Jp8gVxwkG7oICAmMiH+zH0C8Kyowhwkb4xvCh0yMSWWfEnnCVI/yb2 H30AFRwME/QT5KLb3oMjKZORTcAxL0JmLOsxElWIyd2Nw6Jl2a6q80ztRbXrPqhITjBH zvu5tOEr5H4ibW8TPTo7eo9UMepHAi1QEcwgciCJZVsC6S4jP9UOSnk64k63AGeEaKtL my7CAPPwzzM14E1c815+kGkf4vGcOxt+b7oPBN9UoDHPbLimVSFwFTSXJRTwQY4IZ7oa n6w8fvmLHtvJA9KNUGJuiNfl66B+JHuEHd2wO1AgGUcgv7JrUhHkVMhjZCSufxfOHVzg i5ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id k13si3243469qtm.232.2019.03.13.08.51.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 08:51:36 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 097237F6BA; Wed, 13 Mar 2019 15:51:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D454760F89; Wed, 13 Mar 2019 15:51:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8CBE94ED25; Wed, 13 Mar 2019 15:51:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2DFpRVi001354 for ; Wed, 13 Mar 2019 11:51:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6F5426B8C7; Wed, 13 Mar 2019 15:51:27 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-124-40.rdu2.redhat.com [10.10.124.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 057626A96F; Wed, 13 Mar 2019 15:51:26 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 13 Mar 2019 11:51:12 -0400 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 03/11] conf: net: Rename 'model' to 'modelstr' X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 13 Mar 2019 15:51:36 +0000 (UTC) We will be adding a 'model' enum in upcoming patches. Rename the existing value to make the differentiation clear Signed-off-by: Cole Robinson --- src/conf/domain_conf.c | 16 ++++++++-------- src/conf/domain_conf.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d282b4d3ae..fe1945b644 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2227,7 +2227,7 @@ virDomainNetDefClear(virDomainNetDefPtr def) if (!def) return; - VIR_FREE(def->model); + VIR_FREE(def->modelstr); switch (def->type) { case VIR_DOMAIN_NET_TYPE_VHOSTUSER: @@ -11495,7 +11495,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) { @@ -21732,10 +21732,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; } @@ -29379,28 +29379,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 39618928f7..a0d443ee1b 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1021,7 +1021,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 */