]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Add VSH_OFLAG_EMPTY_OK for attach-disk command
authorXu He Jie <xuhj@linux.vnet.ibm.com>
Tue, 8 Nov 2011 07:16:34 +0000 (15:16 +0800)
committerEric Blake <eblake@redhat.com>
Tue, 8 Nov 2011 23:04:56 +0000 (16:04 -0700)
commit2d764cb4724cf03b95a53f5f44a80939fb16bc47
tree8c9cb77dded6e8432721e81d1293cb325bccdc33
parentab4823a062fa372efc555514c2be21553f361e92
virsh: Add VSH_OFLAG_EMPTY_OK for attach-disk command

As the description of removing CDROM media from
  http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#eject_DEV

Add flag 'VSH_OFLAG_EMPTY_OK' to the option 'source' of attach-disk

Then avoid outputting <source> in the XML if 'source' was empty,
rather than trusting libvirt domain_conf.c to understand an empty
string.

Signed-off-by: Xu He Jie <xuhj@linux.vnet.ibm.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tools/virsh.c