mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +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)
|
||||
{
|
||||
virBufferAddLit(attrBuf, " type='pci'");
|
||||
virBufferAsprintf(attrBuf, " managed='%s'",
|
||||
virTristateBoolTypeToString(nvme->managed));
|
||||
if (nvme->managed != VIR_TRISTATE_BOOL_ABSENT)
|
||||
virBufferAsprintf(attrBuf, " managed='%s'",
|
||||
virTristateBoolTypeToString(nvme->managed));
|
||||
virBufferAsprintf(attrBuf, " namespace='%llu'", nvme->namespc);
|
||||
virPCIDeviceAddressFormat(childBuf, nvme->pciAddr, false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user