]> xenbits.xensource.com Git - libvirt.git/commit
xml: Change virtual file names of xml documents parsed in memory
authorPeter Krempa <pkrempa@redhat.com>
Thu, 8 Sep 2011 13:25:01 +0000 (15:25 +0200)
committerEric Blake <eblake@redhat.com>
Thu, 8 Sep 2011 16:20:33 +0000 (17:20 +0100)
commit498d783387389bfd74437bf84374583f5a3d3bf6
tree5f1e6417f4c0bdce2bda4ed275e691b43207cfa0
parent2acd4a1640f07f1376d302fa412e5aa74cb604d2
xml: Change virtual file names of xml documents parsed in memory

While parsing XML strings from memory, the previous convention in
libvirt was to set the virtual file name to "domain.xml" or something
similar. This could potentialy trick the user into looking for a file
named domain.xml on the disk in an attempt to fix the error.

This patch changes these filenames to something that can't be as easily
confused for a valid filename.

Examples of error messages:
---------------------------
Error while loading file from disk:

15:07:59.015: 527: error : catchXMLError:709 : /path/to/domain.xml:1: StartTag: invalid element name
<domain type='kvm'><
--------------------^

Error while parsing definition in memory:

15:08:43.581: 525: error : catchXMLError:709 : (domain definition):2: error parsing attribute name
  <name>vm1</name>
--^
src/conf/domain_conf.c
src/security/virt-aa-helper.c
tools/virsh.c