Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:kernel-2.6.32
libvirt-cim
versions.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File versions.patch of Package libvirt-cim
Index: libvirt-cim-0.5.1/schema/VirtualSystemManagementService.mof =================================================================== --- libvirt-cim-0.5.1.orig/schema/VirtualSystemManagementService.mof +++ libvirt-cim-0.5.1/schema/VirtualSystemManagementService.mof @@ -8,6 +8,9 @@ class Xen_VirtualSystemManagementService [Description("HG revision number of the providers")] string Revision; + + [Description("LibVirt Version")] + string LibvirtVersion; }; [Provider("cmpi::Virt_VirtualSystemManagementService")] Index: libvirt-cim-0.5.1/src/Virt_VirtualSystemManagementService.c =================================================================== --- libvirt-cim-0.5.1.orig/src/Virt_VirtualSystemManagementService.c +++ libvirt-cim-0.5.1/src/Virt_VirtualSystemManagementService.c @@ -1875,8 +1875,10 @@ CMPIStatus get_vsms(const CMPIObjectPath const char *ccname = NULL; virConnectPtr conn = NULL; unsigned long hv_version = 0; + unsigned long lv_version = 0; const char * hv_type = NULL; char *caption = NULL; + char *lv_version_string = NULL; *_inst = NULL; conn = connect_by_classname(broker, CLASSNAME(reference), &s); @@ -1951,7 +1953,26 @@ CMPIStatus get_vsms(const CMPIObjectPath (CMPIValue *)LIBVIRT_CIM_CS, CMPI_chars); CMSetProperty(inst, "Revision", - (CMPIValue *)LIBVIRT_CIM_RV, CMPI_chars); + (CMPIValue *)PACKAGE_VERSION, CMPI_chars); + + if (virGetVersion(&lv_version, "Xen", &hv_version) < 0) { + CU_DEBUG("Unable to get libvirt version"); + lv_version= 0; + hv_version= 0; + } + + if (asprintf(&lv_version_string, "%lu.%lu.%lu", + lv_version / 1000000, + (lv_version % 1000000) / 1000, + (lv_version % 1000000) % 1000) == -1) + lv_version_string = NULL; + + if (lv_version_string != NULL) + CMSetProperty(inst, "LibvirtVersion", + (CMPIValue *)lv_version_string, CMPI_chars); + else + CMSetProperty(inst, "LibvirtVersion", + (CMPIValue *)"Unknown Libvirt", CMPI_chars); if (is_get_inst) { s = cu_validate_ref(broker, reference, inst); @@ -1964,6 +1985,7 @@ CMPIStatus get_vsms(const CMPIObjectPath ""); out: free(caption); + free(lv_version_string); virConnectClose(conn); *_inst = inst;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor