mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-19 18:11:31 +00:00
capabilities: Format <domain/> properly
The <domain/> element under /capabilities/guest/arch/ can have no child elements. If that's the case we format: <domain type='xen'> </domain> instead of simpler: <domain type='xen'/> This commit fixes that. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
7c6dbf3518
commit
2360fe5d24
@ -969,8 +969,15 @@ virCapabilitiesFormatXML(virCapsPtr caps)
|
||||
}
|
||||
|
||||
for (j = 0; j < caps->guests[i]->arch.ndomains; j++) {
|
||||
virBufferAsprintf(&buf, "<domain type='%s'>\n",
|
||||
virBufferAsprintf(&buf, "<domain type='%s'",
|
||||
caps->guests[i]->arch.domains[j]->type);
|
||||
if (!caps->guests[i]->arch.domains[j]->info.emulator &&
|
||||
!caps->guests[i]->arch.domains[j]->info.loader &&
|
||||
!caps->guests[i]->arch.domains[j]->info.nmachines) {
|
||||
virBufferAddLit(&buf, "/>\n");
|
||||
continue;
|
||||
}
|
||||
virBufferAddLit(&buf, ">\n");
|
||||
virBufferAdjustIndent(&buf, 2);
|
||||
if (caps->guests[i]->arch.domains[j]->info.emulator)
|
||||
virBufferAsprintf(&buf, "<emulator>%s</emulator>\n",
|
||||
|
@ -39,8 +39,7 @@
|
||||
<machine canonical='pc-0.11' maxCpus='255'>pc</machine>
|
||||
<machine maxCpus='255'>pc-0.10</machine>
|
||||
<machine maxCpus='1'>isapc</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
<domain type='kvm'>
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<machine maxCpus='255'>pc-0.11</machine>
|
||||
@ -66,8 +65,7 @@
|
||||
<machine canonical='pc-0.11'>pc</machine>
|
||||
<machine>pc-0.10</machine>
|
||||
<machine>isapc</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
<domain type='kvm'>
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<machine>pc-0.11</machine>
|
||||
@ -108,8 +106,7 @@
|
||||
<machine>realview</machine>
|
||||
<machine>versatilepb</machine>
|
||||
<machine>versatileab</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -119,8 +116,7 @@
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
<machine>machvirt</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -131,8 +127,7 @@
|
||||
<emulator>/usr/bin/qemu-system-microblaze</emulator>
|
||||
<machine>petalogix-s3adsp1800</machine>
|
||||
<machine>microblaze-fdt</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -143,8 +138,7 @@
|
||||
<emulator>/usr/bin/qemu-system-microblazeel</emulator>
|
||||
<machine>petalogix-s3adsp1800</machine>
|
||||
<machine>microblaze-fdt</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -158,8 +152,7 @@
|
||||
<machine>magnum</machine>
|
||||
<machine>pica61</machine>
|
||||
<machine>mips</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -173,8 +166,7 @@
|
||||
<machine>magnum</machine>
|
||||
<machine>pica61</machine>
|
||||
<machine>mips</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -195,8 +187,7 @@
|
||||
<machine>SS-1000</machine>
|
||||
<machine>SS-2000</machine>
|
||||
<machine>SS-2</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -212,8 +203,7 @@
|
||||
<machine>taihu</machine>
|
||||
<machine>mac99</machine>
|
||||
<machine>prep</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -223,8 +213,7 @@
|
||||
<wordsize>32</wordsize>
|
||||
<emulator>/usr/bin/xenner</emulator>
|
||||
<machine>xenner</machine>
|
||||
<domain type='kvm'>
|
||||
</domain>
|
||||
<domain type='kvm'/>
|
||||
</arch>
|
||||
<features>
|
||||
<pae/>
|
||||
@ -240,8 +229,7 @@
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/bin/xenner</emulator>
|
||||
<machine>xenner</machine>
|
||||
<domain type='kvm'>
|
||||
</domain>
|
||||
<domain type='kvm'/>
|
||||
</arch>
|
||||
<features>
|
||||
<acpi default='on' toggle='yes'/>
|
||||
|
@ -43,8 +43,7 @@
|
||||
<arch name='i686'>
|
||||
<wordsize>32</wordsize>
|
||||
<emulator>/usr/bin/test-hv</emulator>
|
||||
<domain type='test'>
|
||||
</domain>
|
||||
<domain type='test'/>
|
||||
</arch>
|
||||
<features>
|
||||
<pae/>
|
||||
@ -57,8 +56,7 @@
|
||||
<arch name='i686'>
|
||||
<wordsize>32</wordsize>
|
||||
<emulator>/usr/bin/test-hv</emulator>
|
||||
<domain type='test'>
|
||||
</domain>
|
||||
<domain type='test'/>
|
||||
</arch>
|
||||
<features>
|
||||
<pae/>
|
||||
|
@ -51,8 +51,7 @@
|
||||
<machine>pc-0.11</machine>
|
||||
<machine>pc-0.10</machine>
|
||||
<machine>isapc</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
<domain type='kvm'>
|
||||
<emulator>/usr/libexec/qemu-kvm</emulator>
|
||||
<machine>pc-1.2</machine>
|
||||
@ -94,8 +93,7 @@
|
||||
<machine>pc-0.11</machine>
|
||||
<machine>pc-0.10</machine>
|
||||
<machine>isapc</machine>
|
||||
<domain type='qemu'>
|
||||
</domain>
|
||||
<domain type='qemu'/>
|
||||
<domain type='kvm'>
|
||||
<emulator>/usr/libexec/qemu-kvm</emulator>
|
||||
<machine>pc-1.2</machine>
|
||||
|
@ -22,8 +22,7 @@
|
||||
<wordsize>32</wordsize>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<pae/>
|
||||
@ -37,8 +36,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<machine>xenfv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<pae/>
|
||||
|
@ -22,8 +22,7 @@
|
||||
<wordsize>32</wordsize>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<pae/>
|
||||
|
@ -19,8 +19,7 @@
|
||||
<wordsize>32</wordsize>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<nonpae/>
|
||||
|
@ -19,8 +19,7 @@
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<ia64_be/>
|
||||
@ -34,8 +33,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<machine>xenfv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<ia64_be/>
|
||||
|
@ -19,8 +19,7 @@
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<ia64_be/>
|
||||
|
@ -19,8 +19,7 @@
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -31,8 +30,7 @@
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<machine>xenfv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<acpi default='on' toggle='yes'/>
|
||||
|
@ -19,8 +19,7 @@
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
|
@ -19,8 +19,7 @@
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
|
@ -22,8 +22,7 @@
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
@ -34,8 +33,7 @@
|
||||
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<machine>xenfv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<pae/>
|
||||
@ -52,8 +50,7 @@
|
||||
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<machine>xenfv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
<features>
|
||||
<acpi default='on' toggle='yes'/>
|
||||
|
@ -22,8 +22,7 @@
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
||||
<machine>xenpv</machine>
|
||||
<domain type='xen'>
|
||||
</domain>
|
||||
<domain type='xen'/>
|
||||
</arch>
|
||||
</guest>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user