]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Try to keep printed XML pretty with change-media
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 6 Nov 2015 14:11:36 +0000 (15:11 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 26 Nov 2015 14:10:55 +0000 (15:10 +0100)
commitadac38dbbdc3bd1dd7c1e99de0bdc1f59f940923
tree36068f93fdff0dea6c26328811e9cba02972af60
parent7ec235ed092a2408ca0d3b7fd1c4bfcbc3fc835e
virsh: Try to keep printed XML pretty with change-media

When adding a new media with change-media and --print-xml, let's try
making it more readable and nice.

Before:
<disk type="file" device="cdrom">
...
      <target dev="hdb" bus="ide"/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    <source file="/tmp/a.iso"/></disk>

After:
<disk type="file" device="cdrom">
...
      <source file="/tmp/a.iso"/>
      <target dev="hdb" bus="ide"/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    </disk>

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
tools/virsh-domain.c