From 75107ae516a445a7d7ccde17152fe6ae581f1d64 Mon Sep 17 00:00:00 2001 From: Chen Hanxiao Date: Thu, 20 Jul 2017 10:02:30 +0800 Subject: [PATCH] LXC: set the right var to NULL For attaching hosdev, we should set dev->data.hostdev rather than dev->data.disk Signed-off-by: Chen Hanxiao --- 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 652e9cba03..6a9c528933 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: