提交 172218a0 编写于 作者: J John Ferlan

libxl: Fix broken build attach/detach controller device

Commit id '44304c6e' added the API libxlDomainAttachControllerDevice
inside a conditional LIBXL_HAVE_PVUSB, but called that function outside
the conditional in libxlDomainAttachDeviceLive.

Similarly, the API libxlDomainDetachControllerDevice was added inside a
conditional LIBXL_HAVE_PVUSB, but called outside the conditional in
libxlDomainDetachDeviceLive.

This patch adds the conditional LIBXL_HAVE_PVUSB around those two calls
from within the switch.
上级 1bfdd956
......@@ -3405,11 +3405,13 @@ libxlDomainAttachDeviceLive(libxlDriverPrivatePtr driver,
dev->data.disk = NULL;
break;
#ifdef LIBXL_HAVE_PVUSB
case VIR_DOMAIN_DEVICE_CONTROLLER:
ret = libxlDomainAttachControllerDevice(driver, vm, dev->data.controller);
if (!ret)
dev->data.controller = NULL;
break;
#endif
case VIR_DOMAIN_DEVICE_NET:
ret = libxlDomainAttachNetDevice(driver, vm,
......@@ -3826,9 +3828,11 @@ libxlDomainDetachDeviceLive(libxlDriverPrivatePtr driver,
ret = libxlDomainDetachDeviceDiskLive(vm, dev);
break;
#ifdef LIBXL_HAVE_PVUSB
case VIR_DOMAIN_DEVICE_CONTROLLER:
ret = libxlDomainDetachControllerDevice(driver, vm, dev);
break;
#endif
case VIR_DOMAIN_DEVICE_NET:
ret = libxlDomainDetachNetDevice(driver, vm,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册