Re: [PATCH] virsh: Strip XML declaration when extracting CPU XMLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 22, 2018 at 04:46:33PM +0100, Jiri Denemark wrote:
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.

What if someone specifies a doctype? O:)
Also, does libvirt produce such files? I don't think we should bother
doing extra work to undo the extra work done by the user.


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


I only see a relation between the bug summary and this patch.
There's no mention of the XML declaration there and no mention of the
other issues mentioned there here in the patch.

Jano

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
tools/virsh-host.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux