# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1228767790 28800
# Node ID d3a74da15a8c97ad2c2058f92a3c4c843211fe75
# Parent 205d33ceaa23a3a116e790590b0109c77c5683aa
Add clock offset support to VSMS
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 205d33ceaa23 -r d3a74da15a8c src/Makefile.am
--- a/src/Makefile.am Mon Dec 08 12:16:42 2008 -0800
+++ b/src/Makefile.am Mon Dec 08 12:23:10 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 d3a74da15a8c 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 12:23:10 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 = CMPI_RC_ERR_INVALID_PARAMETER;
+ goto out;
+ }
+ }
if (fullvirt || STREQC(pfx, "KVM"))
ret = fv_vssd_to_domain(inst, domain, pfx);