mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
virDomainDiskSourceNVMeFormat: Format only valid 'managed' values
VIR_TRISTATE_BOOL_ABSENT which maps to the 'default' string would not be parsed back, so we shouldn't format it either. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2337dbfdd1
commit
fac9a8b4c4
@ -24687,8 +24687,9 @@ virDomainDiskSourceNVMeFormat(virBufferPtr attrBuf,
|
|||||||
const virStorageSourceNVMeDef *nvme)
|
const virStorageSourceNVMeDef *nvme)
|
||||||
{
|
{
|
||||||
virBufferAddLit(attrBuf, " type='pci'");
|
virBufferAddLit(attrBuf, " type='pci'");
|
||||||
virBufferAsprintf(attrBuf, " managed='%s'",
|
if (nvme->managed != VIR_TRISTATE_BOOL_ABSENT)
|
||||||
virTristateBoolTypeToString(nvme->managed));
|
virBufferAsprintf(attrBuf, " managed='%s'",
|
||||||
|
virTristateBoolTypeToString(nvme->managed));
|
||||||
virBufferAsprintf(attrBuf, " namespace='%llu'", nvme->namespc);
|
virBufferAsprintf(attrBuf, " namespace='%llu'", nvme->namespc);
|
||||||
virPCIDeviceAddressFormat(childBuf, nvme->pciAddr, false);
|
virPCIDeviceAddressFormat(childBuf, nvme->pciAddr, false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user