]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
virsh: domain: Don't use vshPrepareDiskXML for creating XML to detach disk
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Mar 2015 10:51:51 +0000 (11:51 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Mar 2015 16:11:37 +0000 (17:11 +0100)
commit1cc820937ac64d75d1a4ce090af7a928e30a7728
treebaa0a683bd3997bfd0d99621a1d9884f5175be7f
parent50bdad6678143304e8af58d795d9a79f26b67778
virsh: domain: Don't use vshPrepareDiskXML for creating XML to detach disk

Since cmdDetachDisk() calls into vshPrepareDiskXML() with
type == VSH_PREPARE_DISK_XML_NONE && source == NULL this would result
into skipping all the checks and effectively turn the function into a
XML formatter.

This patch changes the code to use the formatter directly so that the
function can be refactored in a easier way.
tools/virsh-domain.c