提交 5031bb2c 编写于 作者: A Anya Harter 提交者: John Ferlan

domain_addr: delete virDomainVirtioSerialAddrRelease

the last use of this function was deleted in commit
    19a148b7Signed-off-by: NAnya Harter <aharter@redhat.com>
上级 039802ca
......@@ -1607,50 +1607,6 @@ virDomainVirtioSerialAddrReserve(virDomainDefPtr def ATTRIBUTE_UNUSED,
return ret;
}
/* virDomainVirtioSerialAddrRelease
*
* Release the virtio serial address of the device
*/
int
virDomainVirtioSerialAddrRelease(virDomainVirtioSerialAddrSetPtr addrs,
virDomainDeviceInfoPtr info)
{
virBitmapPtr map;
char *str = NULL;
int ret = -1;
ssize_t i;
if (info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_SERIAL ||
info->addr.vioserial.port == 0)
return 0;
VIR_DEBUG("Releasing virtio serial %u %u", info->addr.vioserial.controller,
info->addr.vioserial.port);
i = virDomainVirtioSerialAddrFindController(addrs, info->addr.vioserial.controller);
if (i < 0) {
virReportError(VIR_ERR_XML_ERROR,
_("virtio serial controller %u is missing"),
info->addr.vioserial.controller);
goto cleanup;
}
map = addrs->controllers[i]->ports;
if (virBitmapClearBit(map, info->addr.vioserial.port) < 0) {
virReportError(VIR_ERR_XML_ERROR,
_("virtio serial controller %u does not have port %u"),
info->addr.vioserial.controller,
info->addr.vioserial.port);
goto cleanup;
}
ret = 0;
cleanup:
VIR_FREE(str);
return ret;
}
bool
virDomainUSBAddressPortIsValid(unsigned int *port)
......
......@@ -258,11 +258,6 @@ virDomainVirtioSerialAddrReserve(virDomainDefPtr def,
void *data)
ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);
int
virDomainVirtioSerialAddrRelease(virDomainVirtioSerialAddrSetPtr addrs,
virDomainDeviceInfoPtr info)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
bool
virDomainUSBAddressPortIsValid(unsigned int *port)
ATTRIBUTE_NONNULL(1);
......
......@@ -139,7 +139,6 @@ virDomainVirtioSerialAddrAssign;
virDomainVirtioSerialAddrAutoAssign;
virDomainVirtioSerialAddrAutoAssignFromCache;
virDomainVirtioSerialAddrIsComplete;
virDomainVirtioSerialAddrRelease;
virDomainVirtioSerialAddrReserve;
virDomainVirtioSerialAddrSetAddControllers;
virDomainVirtioSerialAddrSetCreate;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册