File 875-lxc.patch of Package libvirt-cim

# HG changeset patch
# User Kaitlin Rupert <karupert@us.ibm.com>
# Date 1242279945 25200
# Node ID cde25ad65c74923699b801535002f3390b44f7f0
# Parent  4ac0b029df21346d5f958d1b5a29c7360b7850ae
Set the InitPath for LXC guests

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

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

Index: libvirt-cim-0.5.2/src/Virt_VSSD.c
===================================================================
--- libvirt-cim-0.5.2.orig/src/Virt_VSSD.c
+++ libvirt-cim-0.5.2/src/Virt_VSSD.c
@@ -88,6 +88,16 @@ static void _set_pv_prop(struct domain *
                               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)
 {
@@ -140,6 +150,8 @@ static int instance_from_dom(virDomainPt
                 _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);
openSUSE Build Service is sponsored by