Fix corrupt XML when boot device is a cdrom

This commit is contained in:
Daniel P. Berrange 2006-08-07 19:56:37 +00:00
parent a9fd476848
commit 4dfbf940a4
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Aug 7 14:57:12 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Corrected string length calculation when appending
a CDROM boot device element. Fixes corrupt XML structure.
Mon Aug 7 11:06:20 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Added a 'port' attribute to the '<graphics>'

View File

@ -1406,7 +1406,7 @@ xend_parse_sexp_desc_os(struct sexpr *node, virBufferPtr buf, int hvm)
*/
virBufferAdd(buf, " <boot dev='hda'/>\n", 22 );
else if (strcmp(tmp, "d") == 0)
virBufferAdd(buf, " <boot dev='/dev/cdrom'/>\n", 24 );
virBufferAdd(buf, " <boot dev='/dev/cdrom'/>\n", 29 );
}
} else {
virBufferVSprintf(buf, " <type>linux</type>\n");