
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1200587110 28800 # Node ID 2602553d1f9ac0bd6fc6ad41b54a466053f03c5d # Parent 65402823a5f10e571e7ed2c61694f1743525006f Fix xmlgen to include boot parameter for KVM Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 65402823a5f1 -r 2602553d1f9a libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Thu Jan 17 08:25:01 2008 -0800 +++ b/libxkutil/xmlgen.c Thu Jan 17 08:25:10 2008 -0800 @@ -462,21 +462,32 @@ static char *_kvm_os_xml(struct domain * int ret; char *xml; char *type; + char *boot; + struct kv bootattr = {"dev", NULL}; if (os->type == NULL) os->type = strdup("hvm"); + if (os->boot == NULL) + os->boot = strdup("hd"); + type = tagify("type", os->type, NULL, 0); + bootattr.val = os->boot; + boot = tagify("boot", NULL, &bootattr, 1); + ret = asprintf(&xml, "<os>\n" " %s\n" + " %s\n" "</os>\n", - type); + type, + boot); if (ret == -1) xml = NULL; free(type); + free(boot); return xml; }