* src/qemu/qemu_driver.c (qemudDomainDetachDevice,
qemudDomainAttachDevice, qemuDomainUpdateDeviceFlags)
---
src/qemu/qemu_driver.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f00d8a3..b55e189 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8864,6 +8864,9 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
goto endjob;
}
+ if (ret == 0 && !vm->updated)
+ vm->updated = 1;
+
if (!ret && virDomainSaveStatus(driver->caps, driver->stateDir, vm)
< 0)
ret = -1;
@@ -9074,6 +9077,9 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
break;
}
+ if (ret == 0 && !vm->updated)
+ vm->updated = 1;
+
if (!ret && virDomainSaveStatus(driver->caps, driver->stateDir, vm)
< 0)
ret = -1;
@@ -9748,6 +9754,9 @@ static int qemudDomainDetachDevice(virDomainPtr dom,
"%s", _("This type of device cannot be hot
unplugged"));
}
+ if (ret == 0 && !vm->updated)
+ vm->updated = 1;
+
if (!ret && virDomainSaveStatus(driver->caps, driver->stateDir, vm)
< 0)
ret = -1;
--
1.7.3.2