# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1228771586 28800
# Node ID 1eed258563ade2a9f2193d018a7f410eec6d043c
# Parent 205d33ceaa23a3a116e790590b0109c77c5683aa
(#2) Add clock offset support to VSMS
Changes:
- Fixed inverted error return if clock offset value is incorrect
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 205d33ceaa23 -r 1eed258563ad src/Makefile.am
--- a/src/Makefile.am Mon Dec 08 12:16:42 2008 -0800
+++ b/src/Makefile.am Mon Dec 08 13:26:26 2008 -0800
@@ -89,9 +89,9 @@
libVirt_ComputerSystemMigrationIndication_la_SOURCES =
Virt_ComputerSystemMigrationIndication.c
libVirt_ComputerSystemMigrationIndication_la_LIBADD = -lVirt_ComputerSystem
-libVirt_VirtualSystemManagementService_la_DEPENDENCIES = libVirt_ComputerSystem.la
libVirt_ComputerSystemIndication.la libVirt_RASD.la libVirt_HostSystem.la
libVirt_DevicePool.la libVirt_Device.la
+libVirt_VirtualSystemManagementService_la_DEPENDENCIES = libVirt_ComputerSystem.la
libVirt_ComputerSystemIndication.la libVirt_RASD.la libVirt_HostSystem.la
libVirt_DevicePool.la libVirt_Device.la libVirt_VSSD.la
libVirt_VirtualSystemManagementService_la_SOURCES =
Virt_VirtualSystemManagementService.c
-libVirt_VirtualSystemManagementService_la_LIBADD = -lVirt_ComputerSystem
-lVirt_ComputerSystemIndication -lVirt_RASD -lVirt_HostSystem -lVirt_DevicePool
-lVirt_Device
+libVirt_VirtualSystemManagementService_la_LIBADD = -lVirt_ComputerSystem
-lVirt_ComputerSystemIndication -lVirt_RASD -lVirt_HostSystem -lVirt_DevicePool
-lVirt_Device -lVirt_VSSD
libVirt_VirtualSystemManagementCapabilities_la_DEPENDENCIES = libVirt_HostSystem.la
libVirt_VirtualSystemManagementCapabilities_la_SOURCES =
Virt_VirtualSystemManagementCapabilities.c
diff -r 205d33ceaa23 -r 1eed258563ad src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Mon Dec 08 12:16:42 2008 -0800
+++ b/src/Virt_VirtualSystemManagementService.c Mon Dec 08 13:26:26 2008 -0800
@@ -47,6 +47,7 @@
#include "Virt_VirtualSystemManagementService.h"
#include "Virt_ComputerSystem.h"
#include "Virt_ComputerSystemIndication.h"
+#include "Virt_VSSD.h"
#include "Virt_RASD.h"
#include "Virt_HostSystem.h"
#include "Virt_DevicePool.h"
@@ -308,6 +309,18 @@
if (cu_get_bool_prop(inst, "IsFullVirt", &fullvirt) != CMPI_RC_OK)
fullvirt = false;
+
+ if (cu_get_u16_prop(inst, "ClockOffset", &tmp) == CMPI_RC_OK) {
+ if (tmp == VSSD_CLOCK_UTC)
+ domain->clock = strdup("utc");
+ else if (tmp == VSSD_CLOCK_LOC)
+ domain->clock = strdup("localtime");
+ else {
+ CU_DEBUG("Unknown clock offset value %hi", tmp);
+ ret = 0;
+ goto out;
+ }
+ }
if (fullvirt || STREQC(pfx, "KVM"))
ret = fv_vssd_to_domain(inst, domain, pfx);