diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 5b4f54f42908366ae48ebb88b6d2074f91de7cb1..c997ff9e1e539929c8e49545328a294a7fe86f36 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 == VIR_STORAGE_TYPE_NVME) { /* NVMe namespaces start from 1 */ - if (disk->src->nvme->namespace == 0) { + if (disk->src->nvme->namespc == 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("NVMe namespace can't be zero")); return -1; @@ -9533,7 +9533,7 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node, { g_autoptr(virStorageSourceNVMeDef) nvme = NULL; g_autofree char *type = NULL; - g_autofree char *namespace = NULL; + g_autofree char *namespc = NULL; g_autofree char *managed = NULL; xmlNodePtr address; @@ -9552,16 +9552,16 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node, return -1; } - if (!(namespace = virXMLPropString(node, "namespace"))) { + if (!(namespc = 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; } @@ -24689,7 +24689,7 @@ virDomainDiskSourceNVMeFormat(virBufferPtr attrBuf, virBufferAddLit(attrBuf, " type='pci'"); virBufferAsprintf(attrBuf, " managed='%s'", virTristateBoolTypeToString(nvme->managed)); - virBufferAsprintf(attrBuf, " namespace='%llu'", nvme->namespace); + virBufferAsprintf(attrBuf, " namespace='%llu'", nvme->namespc); virPCIDeviceAddressFormat(childBuf, nvme->pciAddr, false); } diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c index 6565cebe570f8cd83cc6446c9e0703973eb9c3d7..9017cc3be8cdfa8f9521d4ce7aa73b18101623f2 100644 --- a/src/hypervisor/virhostdev.c +++ b/src/hypervisor/virhostdev.c @@ -2212,7 +2212,7 @@ virHostdevGetNVMeDeviceList(virNVMeDeviceListPtr nvmeDevices, continue; if (!(dev = 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 5c85ddd44ca989d097826bbf1dd8d086704cc2f4..22ea2fe0189c359f815f1ee226ff5e838a17cf1d 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1008,7 +1008,7 @@ qemuBlockStorageSourceGetNVMeProps(virStorageSourcePtr 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 e723cc9410ff66f92517b5abc03f8d85b2474fe1..ca39391379138e78d59d210349868c4af2406b8d 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2052,7 +2052,7 @@ virStorageSourceNVMeDefCopy(const virStorageSourceNVMeDef *src) ret = g_new0(virStorageSourceNVMeDef, 1); - ret->namespace = src->namespace; + ret->namespc = src->namespc; ret->managed = src->managed; virPCIDeviceAddressCopy(&ret->pciAddr, &src->pciAddr); return ret; @@ -2069,7 +2069,7 @@ virStorageSourceNVMeDefIsEqual(const virStorageSourceNVMeDef *a, if (!a || !b) return false; - if (a->namespace != b->namespace || + if (a->namespc != b->namespc || a->managed != b->managed || !virPCIDeviceAddressEqual(&a->pciAddr, &b->pciAddr)) return false; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index f2a73feb6a3ddc590ac1a042158fecfff8a0f861..9427057f94e5a3bf8e77c50fed8980e36e4cd5eb 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;