[Libvirt-cim] [PATCH] Set the InitPath for LXC guests

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Thu May 14 05:49:16 UTC 2009


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1242279945 25200
# Node ID 1a625ee4280f4f55fbed04c2eeb973e3af3e5816
# Parent  032d34765a83b2f6784fd33e488b8829f3391603
Set the InitPath for LXC guests

This was missed when InitPath support for LXC guests was added.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 032d34765a83 -r 1a625ee4280f src/Virt_VSSD.c
--- a/src/Virt_VSSD.c	Wed May 13 07:40:47 2009 -0700
+++ b/src/Virt_VSSD.c	Wed May 13 22:45:45 2009 -0700
@@ -88,6 +88,16 @@
                               CMPI_chars);
 }
 
+static void _set_lxc_prop(struct domain *dominfo,
+                          CMPIInstance *inst)
+{
+        if (dominfo->os_info.lxc.init != NULL)
+                CMSetProperty(inst,
+                              "InitPath",
+                              (CMPIValue *)dominfo->os_info.lxc.init,
+                              CMPI_chars);
+}
+
 static int instance_from_dom(virDomainPtr dom,
                              CMPIInstance *inst)
 {
@@ -151,6 +161,8 @@
                 _set_fv_prop(dominfo, inst);
         else if (dominfo->type == DOMAIN_XENPV)
                 _set_pv_prop(dominfo, inst);
+        else if (dominfo->type == DOMAIN_LXC)
+                _set_lxc_prop(dominfo, inst);
         else
                 CU_DEBUG("Unknown domain type %i for creating VSSD",
                          dominfo->type);




More information about the Libvirt-cim mailing list