29-Dec-16 12:58, Nikolay Shirokovskiy пишет:
Because this is invalid xml for containers. This patch almost
reverts 7eda8369, but still skips converting vz sdk bootorder
for containers to libvirt bootorder because we use boot order
in containers for quite different purpurse.
---
I know I reviewed this code just recently. It is just got out
of my sight.
src/vz/vz_sdk.c | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index ced58e5..43a6340 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -1695,21 +1695,6 @@ prlsdkBootOrderCheck(PRL_HANDLE sdkdom, PRL_DEVICE_TYPE sdkType, int sdkIndex,
return ret;
}
-static void
-prlsdkConvertBootOrderCt(virDomainDefPtr def)
-{
- size_t i;
- for (i = 0; i < def->nfss; i++) {
-
- if (STREQ(def->fss[i]->dst, "/")) {
- def->os.nBootDevs = 0;
- return;
- }
- }
- def->os.nBootDevs = 1;
- def->os.bootDevs[0] = VIR_DOMAIN_BOOT_DISK;
-}
-
static int
prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomainDefPtr def)
{
@@ -1870,12 +1855,8 @@ prlsdkLoadDomain(vzDriverPtr driver,
goto error;
/* depends on prlsdkAddDomainHardware */
- if (IS_CT(def)) {
- prlsdkConvertBootOrderCt(def);
- } else {
- if (prlsdkConvertBootOrderVm(sdkdom, def) < 0)
- goto error;
- }
+ if (!IS_CT(def) && prlsdkConvertBootOrderVm(sdkdom, def) < 0)
+ goto error;
pret = PrlVmCfg_GetEnvId(sdkdom, &envId);
prlsdkCheckRetGoto(pret, error);
Trying to make things look better I didn't take into account the fact that it will be impossible to use such xmls to
define CTs correctly thus, ACK.
Maxim
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list