From nobody Sun Feb 8 17:46:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) client-ip=216.205.24.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584987143; cv=none; d=zohomail.com; s=zohoarc; b=LjEa5RMtAZUyEEOPkvDgo9RPJubd5eoCD8beqVy4rNvWkWz6AgmQKKpLpI5lQoD/P7VdMUOiWTNukPt1lFDNQt+BSZ+EKnwARFor6eFoQC2uJxYiGsM880fZl83TUkPGDRZg8z1mo9B/CJYHwk6wkRrs678Rlxj1uDKWyMC7idk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584987143; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=29odkf1bxreRYsdH02PQ9EVW5mjgE15jxlC7Vhj7BAg=; b=G9g6M6Fr55OXw9u2qi9p/gi4UKjET7I2+xFNGckfvcHfm8lEzJtc3swAuzkBaJkrb2JAUwUcR1IeGOQ4R2S7wJesD95q+XNbH7mq0Vc8vI4htuUTc3MIk/8f30HHjPjtSKpe2i9gE7R8iNc3hfKiQi9Dg9xaNMu4U6+JczMNzUo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by mx.zohomail.com with SMTPS id 1584987143464204.03189285268797; Mon, 23 Mar 2020 11:12:23 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-267-V6MV-CnYMu6KuoIdMujbLg-1; Mon, 23 Mar 2020 14:12:19 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 696538010CA; Mon, 23 Mar 2020 18:12:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09F9110002AE; Mon, 23 Mar 2020 18:12:13 +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 194D018089CD; Mon, 23 Mar 2020 18:12:11 +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 02NIC9cr009438 for ; Mon, 23 Mar 2020 14:12:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id D0F218D574; Mon, 23 Mar 2020 18:12:09 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55EE79B934 for ; Mon, 23 Mar 2020 18:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584987142; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=29odkf1bxreRYsdH02PQ9EVW5mjgE15jxlC7Vhj7BAg=; b=ARIuYsQoXHPfYPly6zDsWijCykSoJFuw6QMNYSR8yFhdU3GWsRuka6GQXY/AgJ8E+eiScK uhdj8Sd5XoPNQrGHgPBb5B5INgsYjB8Jxq1KUjycQxuCUHPLF0eWwH5UbvhYIdCc75G9Ob ibmut6aIZJswOZU/qJNPIUmtq1/imOA= X-MC-Unique: V6MV-CnYMu6KuoIdMujbLg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 01/14] conf: rename 'namespace' property of struct _virStorageSourceNVMeDef Date: Mon, 23 Mar 2020 19:11:51 +0100 Message-Id: <8fa4d1ebebea61d8e3f64c13ec8d343f9f0dea5f.1584986997.git.pkrempa@redhat.com> 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 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.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" While 'namespace' is not a reserved word in C, it is in C++. Our compilers are happy with it but syntax-hilighting in some editors hilights is as a keyword. Rename it to prevent confusion. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 12 ++++++------ src/hypervisor/virhostdev.c | 2 +- src/qemu/qemu_block.c | 2 +- src/util/virstoragefile.c | 4 ++-- src/util/virstoragefile.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e0432fc47d..f1e4d33a8d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6087,7 +6087,7 @@ virDomainDiskDefValidate(const virDomainDef *def, if (disk->src->type =3D=3D VIR_STORAGE_TYPE_NVME) { /* NVMe namespaces start from 1 */ - if (disk->src->nvme->namespace =3D=3D 0) { + if (disk->src->nvme->namespc =3D=3D 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("NVMe namespace can't be zero")); return -1; @@ -9525,7 +9525,7 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node, { g_autoptr(virStorageSourceNVMeDef) nvme =3D NULL; g_autofree char *type =3D NULL; - g_autofree char *namespace =3D NULL; + g_autofree char *namespc =3D NULL; g_autofree char *managed =3D NULL; xmlNodePtr address; @@ -9544,16 +9544,16 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node, return -1; } - if (!(namespace =3D virXMLPropString(node, "namespace"))) { + if (!(namespc =3D virXMLPropString(node, "namespace"))) { virReportError(VIR_ERR_XML_ERROR, "%s", _("missing 'namespace' attribute to disk source")); return -1; } - if (virStrToLong_ull(namespace, NULL, 10, &nvme->namespace) < 0) { + if (virStrToLong_ull(namespc, NULL, 10, &nvme->namespc) < 0) { virReportError(VIR_ERR_XML_ERROR, _("malformed namespace '%s'"), - namespace); + namespc); return -1; } @@ -24664,7 +24664,7 @@ virDomainDiskSourceNVMeFormat(virBufferPtr attrBuf, virBufferAddLit(attrBuf, " type=3D'pci'"); virBufferAsprintf(attrBuf, " managed=3D'%s'", virTristateBoolTypeToString(nvme->managed)); - virBufferAsprintf(attrBuf, " namespace=3D'%llu'", nvme->namespace); + virBufferAsprintf(attrBuf, " namespace=3D'%llu'", nvme->namespc); virPCIDeviceAddressFormat(childBuf, nvme->pciAddr, false); } diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c index 6565cebe57..9017cc3be8 100644 --- a/src/hypervisor/virhostdev.c +++ b/src/hypervisor/virhostdev.c @@ -2212,7 +2212,7 @@ virHostdevGetNVMeDeviceList(virNVMeDeviceListPtr nvme= Devices, continue; if (!(dev =3D virNVMeDeviceNew(&srcNVMe->pciAddr, - srcNVMe->namespace, + srcNVMe->namespc, srcNVMe->managed))) return -1; diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 5c85ddd44c..22ea2fe018 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1008,7 +1008,7 @@ qemuBlockStorageSourceGetNVMeProps(virStorageSourcePt= r src) ignore_value(virJSONValueObjectCreate(&ret, "s:driver", "nvme", "s:device", pciAddr, - "U:namespace", nvme->namespace, + "U:namespace", nvme->namespc, NULL)); return ret; } diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index e723cc9410..ca39391379 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2052,7 +2052,7 @@ virStorageSourceNVMeDefCopy(const virStorageSourceNVM= eDef *src) ret =3D g_new0(virStorageSourceNVMeDef, 1); - ret->namespace =3D src->namespace; + ret->namespc =3D src->namespc; ret->managed =3D src->managed; virPCIDeviceAddressCopy(&ret->pciAddr, &src->pciAddr); return ret; @@ -2069,7 +2069,7 @@ virStorageSourceNVMeDefIsEqual(const virStorageSource= NVMeDef *a, if (!a || !b) return false; - if (a->namespace !=3D b->namespace || + if (a->namespc !=3D b->namespc || a->managed !=3D b->managed || !virPCIDeviceAddressEqual(&a->pciAddr, &b->pciAddr)) return false; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index f2a73feb6a..9427057f94 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -245,7 +245,7 @@ struct _virStorageSourceInitiatorDef { typedef struct _virStorageSourceNVMeDef virStorageSourceNVMeDef; typedef virStorageSourceNVMeDef *virStorageSourceNVMeDefPtr; struct _virStorageSourceNVMeDef { - unsigned long long namespace; + unsigned long long namespc; int managed; /* enum virTristateBool */ virPCIDeviceAddress pciAddr; --=20 2.24.1