mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-25 22:15:20 +00:00
conf: add function virDevicePCIAddressEqual
This function is needed by the network driver in a later commit. It is useful in functions like networkNotifyActualDevice and networkReleaseActualDevice
This commit is contained in:
parent
2b51a63bab
commit
3ebf5484bc
@ -129,3 +129,19 @@ virDevicePCIAddressFormat(virBufferPtr buf,
|
|||||||
addr.function);
|
addr.function);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
virDevicePCIAddressEqual(virDevicePCIAddress addr1,
|
||||||
|
virDevicePCIAddress addr2)
|
||||||
|
{
|
||||||
|
int ret = -1;
|
||||||
|
|
||||||
|
if (addr1.domain == addr2.domain &&
|
||||||
|
addr1.bus == addr2.bus &&
|
||||||
|
addr1.slot == addr2.slot &&
|
||||||
|
addr1.function == addr2.function) {
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
@ -59,6 +59,9 @@ int virDevicePCIAddressFormat(virBufferPtr buf,
|
|||||||
virDevicePCIAddress addr,
|
virDevicePCIAddress addr,
|
||||||
bool includeTypeInAddr);
|
bool includeTypeInAddr);
|
||||||
|
|
||||||
|
int virDevicePCIAddressEqual(virDevicePCIAddress addr1,
|
||||||
|
virDevicePCIAddress addr2);
|
||||||
|
|
||||||
|
|
||||||
VIR_ENUM_DECL(virDeviceAddressPciMulti)
|
VIR_ENUM_DECL(virDeviceAddressPciMulti)
|
||||||
|
|
||||||
|
@ -221,6 +221,7 @@ virStreamClass;
|
|||||||
# device_conf.h
|
# device_conf.h
|
||||||
virDeviceAddressPciMultiTypeFromString;
|
virDeviceAddressPciMultiTypeFromString;
|
||||||
virDeviceAddressPciMultiTypeToString;
|
virDeviceAddressPciMultiTypeToString;
|
||||||
|
virDevicePCIAddressEqual;
|
||||||
virDevicePCIAddressFormat;
|
virDevicePCIAddressFormat;
|
||||||
virDevicePCIAddressIsValid;
|
virDevicePCIAddressIsValid;
|
||||||
virDevicePCIAddressParseXML;
|
virDevicePCIAddressParseXML;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user