# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1228767394 28800
# Node ID 780ad920644642f2fa54006b67942d1cfb2992c3
# Parent 18cd726e564ae8bffc518dbb5b27671548b97de1
Add <clock> support to device_parsing and xmlgen
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 18cd726e564a -r 780ad9206446 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Mon Dec 08 12:10:26 2008 -0800
+++ b/libxkutil/device_parsing.c Mon Dec 08 12:16:34 2008 -0800
@@ -882,6 +882,8 @@
set_action(&dominfo->on_reboot, child);
else if (XSTREQ(child->name, "on_crash"))
set_action(&dominfo->on_crash, child);
+ else if (XSTREQ(child->name, "clock"))
+ dominfo->clock = get_attr_value(child, "offset");
}
return 1;
diff -r 18cd726e564a -r 780ad9206446 libxkutil/device_parsing.h
--- a/libxkutil/device_parsing.h Mon Dec 08 12:10:26 2008 -0800
+++ b/libxkutil/device_parsing.h Mon Dec 08 12:16:34 2008 -0800
@@ -113,6 +113,7 @@
char *uuid;
char *bootloader;
char *bootloader_args;
+ char *clock;
union {
struct pv_os_info pv;
diff -r 18cd726e564a -r 780ad9206446 libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Mon Dec 08 12:10:26 2008 -0800
+++ b/libxkutil/xmlgen.c Mon Dec 08 12:16:34 2008 -0800
@@ -404,6 +404,11 @@
NULL,
BAD_CAST "uuid",
BAD_CAST domain->uuid);
+
+ if (domain->clock != NULL) {
+ tmp = xmlNewChild(root, NULL, BAD_CAST "clock", NULL);
+ xmlNewProp(tmp, BAD_CAST "offset", BAD_CAST domain->clock);
+ }
return NULL;
}