# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1228836568 28800
# Node ID 9e63b52769bf42a6c025b7baa32a84afff0f3828
# Parent bbf5b752a9221d12748d9e2bb86dc8ae5b0b5ef1
(#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 bbf5b752a922 -r 9e63b52769bf src/Makefile.am
--- a/src/Makefile.am Tue Dec 09 07:29:28 2008 -0800
+++ b/src/Makefile.am Tue Dec 09 07:29:28 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 bbf5b752a922 -r 9e63b52769bf src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Tue Dec 09 07:29:28 2008 -0800
+++ b/src/Virt_VirtualSystemManagementService.c Tue Dec 09 07:29:28 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);