mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +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);
|
||||
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,
|
||||
bool includeTypeInAddr);
|
||||
|
||||
int virDevicePCIAddressEqual(virDevicePCIAddress addr1,
|
||||
virDevicePCIAddress addr2);
|
||||
|
||||
|
||||
VIR_ENUM_DECL(virDeviceAddressPciMulti)
|
||||
|
||||
|
@ -221,6 +221,7 @@ virStreamClass;
|
||||
# device_conf.h
|
||||
virDeviceAddressPciMultiTypeFromString;
|
||||
virDeviceAddressPciMultiTypeToString;
|
||||
virDevicePCIAddressEqual;
|
||||
virDevicePCIAddressFormat;
|
||||
virDevicePCIAddressIsValid;
|
||||
virDevicePCIAddressParseXML;
|
||||
|
Loading…
Reference in New Issue
Block a user