[libvirt] [PATCH] LXC: set the right var to NULL

Chen Hanxiao chen_han_xiao at 126.com
Thu Jul 20 02:02:30 UTC 2017


From: Chen Hanxiao <chenhanxiao at gmail.com>

   For attaching hosdev, we should set dev->data.hostdev
   rather than dev->data.disk

Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
---
 src/lxc/lxc_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 652e9cb..6a9c528 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -4358,7 +4358,7 @@ lxcDomainAttachDeviceLive(virConnectPtr conn,
     case VIR_DOMAIN_DEVICE_HOSTDEV:
         ret = lxcDomainAttachDeviceHostdevLive(driver, vm, dev);
         if (!ret)
-            dev->data.disk = NULL;
+            dev->data.hostdev = NULL;
         break;
 
     default:
-- 
2.7.4





More information about the libvir-list mailing list