# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1228836568 28800
# Node ID 97232024b240a8ebb69758e767910f65c571954e
# Parent 212d2497ad6e17cdbf3cc19ee91e8e5bbb5e7fc4
Add <clock> support to device_parsing and xmlgen
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 212d2497ad6e -r 97232024b240 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Tue Dec 09 07:29:12 2008 -0800
+++ b/libxkutil/device_parsing.c Tue Dec 09 07:29:28 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 212d2497ad6e -r 97232024b240 libxkutil/device_parsing.h
--- a/libxkutil/device_parsing.h Tue Dec 09 07:29:12 2008 -0800
+++ b/libxkutil/device_parsing.h Tue Dec 09 07:29:28 2008 -0800
@@ -113,6 +113,7 @@
char *uuid;
char *bootloader;
char *bootloader_args;
+ char *clock;
union {
struct pv_os_info pv;
diff -r 212d2497ad6e -r 97232024b240 libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Tue Dec 09 07:29:12 2008 -0800
+++ b/libxkutil/xmlgen.c Tue Dec 09 07:29:28 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;
}