[PATCH] vz: don't show bootorder for containers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux