mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemuDomainNamespaceTeardownHostdev: rename path to paths
To match the "things/nthings" pattern used in virDomainDef.
This commit is contained in:
parent
5b0451ab57
commit
be97d8496a
@ -10042,14 +10042,14 @@ qemuDomainNamespaceTeardownHostdev(virQEMUDriverPtr driver,
|
|||||||
char **devMountsPath = NULL;
|
char **devMountsPath = NULL;
|
||||||
size_t ndevMountsPath = 0;
|
size_t ndevMountsPath = 0;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
char **path = NULL;
|
char **paths = NULL;
|
||||||
size_t i, npaths = 0;
|
size_t i, npaths = 0;
|
||||||
|
|
||||||
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
|
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (qemuDomainGetHostdevPath(vm->def, hostdev, true,
|
if (qemuDomainGetHostdevPath(vm->def, hostdev, true,
|
||||||
&npaths, &path, NULL) < 0)
|
&npaths, &paths, NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
cfg = virQEMUDriverGetConfig(driver);
|
cfg = virQEMUDriverGetConfig(driver);
|
||||||
@ -10059,7 +10059,7 @@ qemuDomainNamespaceTeardownHostdev(virQEMUDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
for (i = 0; i < npaths; i++) {
|
for (i = 0; i < npaths; i++) {
|
||||||
if (qemuDomainDetachDeviceUnlink(driver, vm, path[i],
|
if (qemuDomainDetachDeviceUnlink(driver, vm, paths[i],
|
||||||
devMountsPath, ndevMountsPath) < 0)
|
devMountsPath, ndevMountsPath) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -10067,8 +10067,8 @@ qemuDomainNamespaceTeardownHostdev(virQEMUDriverPtr driver,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < npaths; i++)
|
for (i = 0; i < npaths; i++)
|
||||||
VIR_FREE(path[i]);
|
VIR_FREE(paths[i]);
|
||||||
VIR_FREE(path);
|
VIR_FREE(paths);
|
||||||
virStringListFreeCount(devMountsPath, ndevMountsPath);
|
virStringListFreeCount(devMountsPath, ndevMountsPath);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user