You need to sign in or sign up before continuing.
提交 bc50c99e 编写于 作者: J Ján Tomko

qemuDomainNamespaceSetupHostdev: rename path to paths

To match the "things/nthings" pattern used in virDomainDef.
上级 be97d849
...@@ -9999,13 +9999,13 @@ qemuDomainNamespaceSetupHostdev(virQEMUDriverPtr driver, ...@@ -9999,13 +9999,13 @@ qemuDomainNamespaceSetupHostdev(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(NULL, hostdev, false, &npaths, &path, NULL) < 0) if (qemuDomainGetHostdevPath(NULL, hostdev, false, &npaths, &paths, NULL) < 0)
goto cleanup; goto cleanup;
cfg = virQEMUDriverGetConfig(driver); cfg = virQEMUDriverGetConfig(driver);
...@@ -10017,7 +10017,7 @@ qemuDomainNamespaceSetupHostdev(virQEMUDriverPtr driver, ...@@ -10017,7 +10017,7 @@ qemuDomainNamespaceSetupHostdev(virQEMUDriverPtr driver,
for (i = 0; i < npaths; i++) { for (i = 0; i < npaths; i++) {
if (qemuDomainAttachDeviceMknod(driver, if (qemuDomainAttachDeviceMknod(driver,
vm, vm,
path[i], paths[i],
devMountsPath, ndevMountsPath) < 0) devMountsPath, ndevMountsPath) < 0)
goto cleanup; goto cleanup;
} }
...@@ -10025,8 +10025,8 @@ qemuDomainNamespaceSetupHostdev(virQEMUDriverPtr driver, ...@@ -10025,8 +10025,8 @@ qemuDomainNamespaceSetupHostdev(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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册