summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2023-04-20 17:29:57 +0200
committerMichal Privoznik <mprivozn@redhat.com>2023-04-25 08:46:27 +0200
commitc8b286935d5b1b05ec3bdb0138174b86d9f1f8c6 (patch)
tree3f71b4be4fc3a12c8fbd1abc4319c40901a120f1
parentc4bc4d3b82fbe22e03c986ca896090f481df5c10 (diff)
downloadlibvirt-c8b286935d5b1b05ec3bdb0138174b86d9f1f8c6.tar.gz
qemu: Replace @dom argument with @driver in qemuDomainUpdateDeviceLive()
The qemuDomainUpdateDeviceLive() accepts virDomainPtr as one of its arguments, but use it only to get QEMU driver out of it. Well, the only caller already does that and thus can pass it instead of virDomainPtr. This also makes it look like the rest of device hot(un-)plug functions: qemuDomainAttachDeviceLive() and qemuDomainUpdateDeviceLive(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
-rw-r--r--src/qemu/qemu_driver.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 523a83682c..48eb759531 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7070,10 +7070,9 @@ qemuDomainChangeMemoryLive(virQEMUDriver *driver G_GNUC_UNUSED,
static int
qemuDomainUpdateDeviceLive(virDomainObj *vm,
virDomainDeviceDef *dev,
- virDomainPtr dom,
+ virQEMUDriver *driver,
bool force)
{
- virQEMUDriver *driver = dom->conn->privateData;
virDomainDeviceDef oldDev = { .type = dev->type };
int idx;
@@ -7939,7 +7938,7 @@ qemuDomainUpdateDeviceFlags(virDomainPtr dom,
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
/* virDomainDefCompatibleDevice call is delayed until we know the
* device we're going to update. */
- if ((ret = qemuDomainUpdateDeviceLive(vm, dev_live, dom, force)) < 0)
+ if ((ret = qemuDomainUpdateDeviceLive(vm, dev_live, driver, force)) < 0)
goto endjob;
qemuDomainSaveStatus(vm);