mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 23:25:24 +00:00
vz: Do not use magic constants when building capabilities
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
4c818e76aa
commit
ffb3f69448
@ -119,9 +119,12 @@ vzBuildCapabilities(void)
|
|||||||
if (nodeCapsInitNUMA(caps) < 0)
|
if (nodeCapsInitNUMA(caps) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
for (i = 0; i < 2; i++)
|
|
||||||
for (j = 0; j < 2; j++)
|
verify(ARRAY_CARDINALITY(archs) == ARRAY_CARDINALITY(emulators));
|
||||||
for (k = 0; k < 2; k++)
|
|
||||||
|
for (i = 0; i < ARRAY_CARDINALITY(os_types); i++)
|
||||||
|
for (j = 0; j < ARRAY_CARDINALITY(archs); j++)
|
||||||
|
for (k = 0; k < ARRAY_CARDINALITY(emulators); k++)
|
||||||
if (vzCapsAddGuestDomain(caps, ostypes[i], archs[j],
|
if (vzCapsAddGuestDomain(caps, ostypes[i], archs[j],
|
||||||
emulators[k], virt_types[k]) < 0)
|
emulators[k], virt_types[k]) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
Reference in New Issue
Block a user