From patchwork Fri Jan 18 23:05:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 156104 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3797370jaa; Fri, 18 Jan 2019 15:06:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN7PcjVWi3GjvQlfuejqpQpFK7C97/syFAKgoHsYHazIHY4rMflD6hBEknUZl74i+ReNw6Cj X-Received: by 2002:ac8:4611:: with SMTP id p17mr18428684qtn.263.1547852765772; Fri, 18 Jan 2019 15:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547852765; cv=none; d=google.com; s=arc-20160816; b=mF1vWPoahhlssK8Kygdq5gygwZAXpvlcmTmezRUK7WbhC6afXd0mmlM4hI8vKeY/uP /YcJOYUNslbeq3AP4fK3JYaYlP/vumIRjWDlnh3gNxAS0fQQ+JmuG3JWKfc1Y2nyM7cZ E7+SvH0RRt3wlYtpjxsNs0uo1Y/i4FjT+gUm2TAvxaNPzBL2ztU2zhk6zbtCsJhFbJ8r BVLJWQnT11KQ+KSue4zpZg1wu7r5HwWg5RwHPaKrpNkT9IWGtoGdv2fHNhQbX8okvnXw AqNRw92EGPCTjU8VlT5rJ3XRY1jhmtpQ2czYhLmhRoV1FQv31xG/AgTpJNWwcJ+rDtga 7UEQ== 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=Mm9AiM2Fyk+e1kYq2dIHhpV6KjopZsXCMjRsElB3n1U=; b=rTGkgJa6fFWBXduRdFNHw+CUtnBT6hRcYPc6+n9rfSB+i/iEIxZq0G9Hz51IJ9Q/UT olg8Ez5tjeAfSIRf+MmiRNuLaF+8zoBHk+heBceLZlon9RNk8+V2AuE8dgCMgPJawMrI pqkkmi6sfy450bYZlUIntzazyySiyo+uj7Nro9+6aQE7I/GiwtRHbCUWypQO/poljpxx Q/Kfed+nxt06ETrK0D3t4F8bgAL1U7TQHV8eEpcMRl8dU3T7rFsXlo4qV95xw6Ue3OUE tGOT1lwjq51P4kzCR/FxksL7lanuGGRfdqX09Y7Gk0SqNVSmF5kkgb5aHBW+aahUV6fs zaGg== 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 t3si364314qto.355.2019.01.18.15.06.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 15:06:05 -0800 (PST) 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-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 078E67D0D3; Fri, 18 Jan 2019 23:06:04 +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 BBF9E5D757; Fri, 18 Jan 2019 23:06:03 +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 33C553F606; Fri, 18 Jan 2019 23:06:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0IN5Z6A008645 for ; Fri, 18 Jan 2019 18:05:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id 071DC600CC; Fri, 18 Jan 2019 23:05:35 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-125-139.rdu2.redhat.com [10.10.125.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81BC5600D6; Fri, 18 Jan 2019 23:05:34 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 18 Jan 2019 18:05:21 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/10] 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 18 Jan 2019 23:06:05 +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 778b842979..25fbf6f64b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2120,7 +2120,7 @@ virDomainNetDefClear(virDomainNetDefPtr def) if (!def) return; - VIR_FREE(def->model); + VIR_FREE(def->modelstr); switch (def->type) { case VIR_DOMAIN_NET_TYPE_VHOSTUSER: @@ -11402,7 +11402,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt, _("Model name contains invalid characters")); goto error; } - def->model = model; + def->modelstr = model; model = NULL; } @@ -21971,10 +21971,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; } @@ -29841,28 +29841,28 @@ virDomainNetGetActualTrustGuestRxFilters(virDomainNetDefPtr iface) const char * virDomainNetGetModelString(const virDomainNetDef *iface) { - return iface->model; + return iface->modelstr; } int virDomainNetSetModelString(virDomainNetDefPtr iface, const char *model) { - return VIR_STRDUP(iface->model, model); + return VIR_STRDUP(iface->modelstr, model); } int virDomainNetStreqModelString(const virDomainNetDef *iface, const char *model) { - return STREQ_NULLABLE(iface->model, model); + return STREQ_NULLABLE(iface->modelstr, model); } int virDomainNetStrcaseeqModelString(const virDomainNetDef *iface, const char *model) { - return iface->model && STRCASEEQ(iface->model, model); + return iface->modelstr && STRCASEEQ(iface->modelstr, model); } bool diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 8f856c2d14..5400deda4c 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 */