提交 ffb3f694 编写于 作者: M Martin Kletzander

vz: Do not use magic constants when building capabilities

Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 4c818e76
......@@ -119,9 +119,12 @@ vzBuildCapabilities(void)
if (nodeCapsInitNUMA(caps) < 0)
goto error;
for (i = 0; i < 2; i++)
for (j = 0; j < 2; j++)
for (k = 0; k < 2; k++)
verify(ARRAY_CARDINALITY(archs) == ARRAY_CARDINALITY(emulators));
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],
emulators[k], virt_types[k]) < 0)
goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册