
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1200503258 28800 # Node ID be7f34a7f1a879dc220eaa8f5e2eab6dd3a04420 # Parent 0772ada04c729ecbf3a3854fa63f748311a082e4 Fix xmlgen to include boot parameter for KVM Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 0772ada04c72 -r be7f34a7f1a8 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Wed Jan 16 08:20:54 2008 -0800 +++ b/libxkutil/xmlgen.c Wed Jan 16 09:07:38 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; }