提交 3ebf5484 编写于 作者: S Shradha Shah 提交者: Laine Stump

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
上级 2b51a63b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册