qemuNamespaceMknodPaths: Remove 'ndevMountsPath'

'devMountsPath' can be converted to an auto-cleared stringlist and thus
asking for the number of entries is not necessary.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-08-03 12:45:37 +02:00
parent b28cf6a44e
commit 1b3c391a55

View File

@ -1250,8 +1250,7 @@ qemuNamespaceMknodPaths(virDomainObj *vm,
qemuDomainObjPrivate *priv = vm->privateData;
virQEMUDriver *driver = priv->driver;
g_autoptr(virQEMUDriverConfig) cfg = NULL;
char **devMountsPath = NULL;
size_t ndevMountsPath = 0;
g_auto(GStrv) devMountsPath = NULL;
qemuNamespaceMknodData data = { 0 };
size_t i;
int ret = -1;
@ -1261,9 +1260,7 @@ qemuNamespaceMknodPaths(virDomainObj *vm,
return 0;
cfg = virQEMUDriverGetConfig(driver);
if (qemuDomainGetPreservedMounts(cfg, vm,
&devMountsPath, NULL,
&ndevMountsPath) < 0)
if (qemuDomainGetPreservedMounts(cfg, vm, &devMountsPath, NULL, NULL) < 0)
return -1;
data.driver = driver;
@ -1304,7 +1301,6 @@ qemuNamespaceMknodPaths(virDomainObj *vm,
}
}
qemuNamespaceMknodDataClear(&data);
virStringListFreeCount(devMountsPath, ndevMountsPath);
return ret;
}