mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 21:45:21 +00:00
conf: Use virTristateXXX in virStorageSourceNVMeDef
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
c33c482df4
commit
e949edeec8
@ -8492,12 +8492,14 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node,
|
||||
}
|
||||
|
||||
if ((managed = virXMLPropString(node, "managed"))) {
|
||||
if ((nvme->managed = virTristateBoolTypeFromString(managed)) <= 0) {
|
||||
int value;
|
||||
if ((value = virTristateBoolTypeFromString(managed)) <= 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("malformed managed value '%s'"),
|
||||
managed);
|
||||
return -1;
|
||||
}
|
||||
nvme->managed = value;
|
||||
}
|
||||
|
||||
if (!(address = virXPathNode("./address", ctxt))) {
|
||||
|
@ -242,7 +242,7 @@ struct _virStorageSourceInitiatorDef {
|
||||
typedef struct _virStorageSourceNVMeDef virStorageSourceNVMeDef;
|
||||
struct _virStorageSourceNVMeDef {
|
||||
unsigned long long namespc;
|
||||
int managed; /* enum virTristateBool */
|
||||
virTristateBool managed;
|
||||
virPCIDeviceAddress pciAddr;
|
||||
|
||||
/* Don't forget to update virStorageSourceNVMeDefCopy */
|
||||
|
Loading…
x
Reference in New Issue
Block a user