[Libvirt-cim] [PATCH] Expose HealthState of LogicalDisk

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Mon Aug 24 21:54:16 UTC 2009


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1251150322 25200
# Node ID 5a1871168fd4d9b906646bc4b036a950bcc339df
# Parent  0243aa0574431112f0946354d4bbad62bb2c2f7b
Expose HealthState of LogicalDisk

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

diff -r 0243aa057443 -r 5a1871168fd4 src/Virt_Device.c
--- a/src/Virt_Device.c	Thu Aug 20 17:16:24 2009 -0700
+++ b/src/Virt_Device.c	Mon Aug 24 14:45:22 2009 -0700
@@ -127,6 +127,7 @@
 {
         CMPIInstance *inst;
         virConnectPtr conn;
+        uint16_t state;
 
         conn = virDomainGetConnect(dom);
         inst = get_typed_instance(broker,
@@ -137,6 +138,10 @@
         if (!disk_set_name(inst, dev))
                 return NULL;
 
+        //Set HealthState to "OK"
+        state = 5;
+        CMSetProperty(inst, "HealthState", (CMPIValue *)&state, CMPI_uint16);
+
         return inst;
 }
 




More information about the Libvirt-cim mailing list