]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainChangeDiskLive: rework slightly
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 15 Sep 2015 12:37:21 +0000 (14:37 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 18 Sep 2015 13:51:18 +0000 (15:51 +0200)
commitc08475824be3d506614efd26d6354270baea10e3
tree3b3b60b2611da2e0894bdc6a31cc1a24f5637179
parentcb2ed632e6c5b67e06722c79849cce05cb079950
qemuDomainChangeDiskLive: rework slightly

Firstly, our coding guidelines suggest using 'cleanup' label
instead of 'end'. Then, @ret should be set to value representing
success as the last statement before the 'cleanup' label.
And while I am at this function, lets enumerate all the possible
enum items (virDomainDiskDevice) and avoid using 'default' in
switch(). Pooh. Also, nothing bad happens if we look up the disk
to change in the domain upfront. In fact, it's going to be
helpful later when we want to keep some old values for performing
a rollback.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_driver.c