]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Strip XML declaration when extracting CPU XMLs
authorJiri Denemark <jdenemar@redhat.com>
Thu, 22 Nov 2018 15:28:56 +0000 (16:28 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 29 Nov 2018 10:46:42 +0000 (11:46 +0100)
commitfcd1c865e168bdb9763b19e790c15e80aa29be66
treeeb6b17da9fabfd470594e92927f3b54f0bcd06d8
parenteca9d21e6cc8129ec4426fbf1ace30e215b9cfbc
virsh: Strip XML declaration when extracting CPU XMLs

Since commit v4.3.0-336-gc84726fbdd all
{hypervisor-,}cpu-{baseline,compare} commands use a generic
vshExtractCPUDefXMLs helper for extracting individual CPU definitions
from the provided input file. The helper wraps the input file in a
<container> element so that several independent elements can be easily
parsed from the file. This works fine except when the file starts with
XML declaration (<?xml version="1.0" ... ?>) because the XML declaration
cannot be put inside any element. In fact it has to be at the very
beginning of the XML document without any preceding white space
characters. We can just simply skip the XML declaration.

https://bugzilla.redhat.com/show_bug.cgi?id=1592737

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-host.c