mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
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>
This commit is contained in:
parent
c4bc4d3b82
commit
c8b286935d
@ -7070,10 +7070,9 @@ qemuDomainChangeMemoryLive(virQEMUDriver *driver G_GNUC_UNUSED,
|
|||||||
static int
|
static int
|
||||||
qemuDomainUpdateDeviceLive(virDomainObj *vm,
|
qemuDomainUpdateDeviceLive(virDomainObj *vm,
|
||||||
virDomainDeviceDef *dev,
|
virDomainDeviceDef *dev,
|
||||||
virDomainPtr dom,
|
virQEMUDriver *driver,
|
||||||
bool force)
|
bool force)
|
||||||
{
|
{
|
||||||
virQEMUDriver *driver = dom->conn->privateData;
|
|
||||||
virDomainDeviceDef oldDev = { .type = dev->type };
|
virDomainDeviceDef oldDev = { .type = dev->type };
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
@ -7939,7 +7938,7 @@ qemuDomainUpdateDeviceFlags(virDomainPtr dom,
|
|||||||
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
|
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
|
||||||
/* virDomainDefCompatibleDevice call is delayed until we know the
|
/* virDomainDefCompatibleDevice call is delayed until we know the
|
||||||
* device we're going to update. */
|
* 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;
|
goto endjob;
|
||||||
|
|
||||||
qemuDomainSaveStatus(vm);
|
qemuDomainSaveStatus(vm);
|
||||||
|
Loading…
Reference in New Issue
Block a user