mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: hostdev: Unify naming for qemuHostdevReAttach*Devices()
Adopt the same names used for virHostdevReAttach*Devices() for consistency's sake and to make it easier to jump between the two. No functional changes.
This commit is contained in:
parent
c074a64251
commit
5ab29e369f
@ -309,7 +309,7 @@ qemuHostdevPrepareDomainDevices(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
void
|
||||
qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
|
||||
qemuHostdevReAttachPCIDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs)
|
||||
@ -325,7 +325,7 @@ qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
void
|
||||
qemuDomainReAttachHostUSBDevices(virQEMUDriverPtr driver,
|
||||
qemuHostdevReAttachUSBDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs)
|
||||
@ -337,7 +337,7 @@ qemuDomainReAttachHostUSBDevices(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
void
|
||||
qemuDomainReAttachHostSCSIDevices(virQEMUDriverPtr driver,
|
||||
qemuHostdevReAttachSCSIDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs)
|
||||
@ -360,18 +360,18 @@ qemuDomainReAttachHostSCSIDevices(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
void
|
||||
qemuDomainReAttachHostDevices(virQEMUDriverPtr driver,
|
||||
qemuHostdevReAttachDomainDevices(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
if (!def->nhostdevs)
|
||||
return;
|
||||
|
||||
qemuDomainReAttachHostdevDevices(driver, def->name, def->hostdevs,
|
||||
qemuHostdevReAttachPCIDevices(driver, def->name, def->hostdevs,
|
||||
def->nhostdevs);
|
||||
|
||||
qemuDomainReAttachHostUSBDevices(driver, def->name, def->hostdevs,
|
||||
qemuHostdevReAttachUSBDevices(driver, def->name, def->hostdevs,
|
||||
def->nhostdevs);
|
||||
|
||||
qemuDomainReAttachHostSCSIDevices(driver, def->name, def->hostdevs,
|
||||
qemuHostdevReAttachSCSIDevices(driver, def->name, def->hostdevs,
|
||||
def->nhostdevs);
|
||||
}
|
||||
|
@ -56,20 +56,20 @@ int qemuHostdevPrepareDomainDevices(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
virQEMUCapsPtr qemuCaps,
|
||||
unsigned int flags);
|
||||
void
|
||||
qemuDomainReAttachHostUSBDevices(virQEMUDriverPtr driver,
|
||||
|
||||
void qemuHostdevReAttachPCIDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs);
|
||||
void qemuDomainReAttachHostSCSIDevices(virQEMUDriverPtr driver,
|
||||
void qemuHostdevReAttachUSBDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs);
|
||||
void qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
|
||||
void qemuHostdevReAttachSCSIDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs);
|
||||
void qemuDomainReAttachHostDevices(virQEMUDriverPtr driver,
|
||||
void qemuHostdevReAttachDomainDevices(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def);
|
||||
|
||||
#endif /* __QEMU_HOSTDEV_H__ */
|
||||
|
@ -1383,7 +1383,7 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver,
|
||||
if (releaseaddr)
|
||||
qemuDomainReleaseDeviceAddress(vm, hostdev->info, NULL);
|
||||
|
||||
qemuDomainReAttachHostdevDevices(driver, vm->def->name, &hostdev, 1);
|
||||
qemuHostdevReAttachPCIDevices(driver, vm->def->name, &hostdev, 1);
|
||||
|
||||
VIR_FREE(devstr);
|
||||
VIR_FREE(configfd_name);
|
||||
@ -1936,7 +1936,7 @@ qemuDomainAttachHostUSBDevice(virQEMUDriverPtr driver,
|
||||
vm->def, hostdev, NULL) < 0)
|
||||
VIR_WARN("Unable to restore host device labelling on hotplug fail");
|
||||
if (added)
|
||||
qemuDomainReAttachHostUSBDevices(driver, vm->def->name, &hostdev, 1);
|
||||
qemuHostdevReAttachUSBDevices(driver, vm->def->name, &hostdev, 1);
|
||||
}
|
||||
VIR_FREE(devstr);
|
||||
return ret;
|
||||
@ -2036,7 +2036,7 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn,
|
||||
ret = 0;
|
||||
cleanup:
|
||||
if (ret < 0) {
|
||||
qemuDomainReAttachHostSCSIDevices(driver, vm->def->name, &hostdev, 1);
|
||||
qemuHostdevReAttachSCSIDevices(driver, vm->def->name, &hostdev, 1);
|
||||
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
|
||||
VIR_WARN("Unable to remove host device cgroup ACL on hotplug fail");
|
||||
if (teardownlabel &&
|
||||
@ -2969,7 +2969,7 @@ qemuDomainRemovePCIHostDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev)
|
||||
{
|
||||
qemuDomainReAttachHostdevDevices(driver, vm->def->name, &hostdev, 1);
|
||||
qemuHostdevReAttachPCIDevices(driver, vm->def->name, &hostdev, 1);
|
||||
qemuDomainReleaseDeviceAddress(vm, hostdev->info, NULL);
|
||||
}
|
||||
|
||||
@ -2978,7 +2978,7 @@ qemuDomainRemoveUSBHostDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev)
|
||||
{
|
||||
qemuDomainReAttachHostUSBDevices(driver, vm->def->name, &hostdev, 1);
|
||||
qemuHostdevReAttachUSBDevices(driver, vm->def->name, &hostdev, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2986,7 +2986,7 @@ qemuDomainRemoveSCSIHostDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev)
|
||||
{
|
||||
qemuDomainReAttachHostSCSIDevices(driver, vm->def->name, &hostdev, 1);
|
||||
qemuHostdevReAttachSCSIDevices(driver, vm->def->name, &hostdev, 1);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -5342,7 +5342,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
||||
priv->vioserialaddrs = NULL;
|
||||
}
|
||||
|
||||
qemuDomainReAttachHostDevices(driver, vm->def);
|
||||
qemuHostdevReAttachDomainDevices(driver, vm->def);
|
||||
|
||||
def = vm->def;
|
||||
for (i = 0; i < def->nnets; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user