]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Convert aborting of a domain job to a switch statement
authorPeter Krempa <pkrempa@redhat.com>
Thu, 5 Dec 2019 11:38:50 +0000 (12:38 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 5 Dec 2019 12:53:15 +0000 (13:53 +0100)
commit6865dc295e08573b0bb166a5a435d27f6b618c47
treef8d7ae4c69dd895b05a239b16ab144c65782aee0
parent4ef3401eb842000ec7258a58dd83bc55cdb5df21
qemu: Convert aborting of a domain job to a switch statement

Until now we only really aborted migration via qemuDomainAbortJob. This
will change with the upcoming addition of the backup job. Additionally
there were a bunch of if statements checking various aspects of the
current job.

To make it more obvious convert qemuDomainAbortJob to use a switch
statement and move the individual conditions to the appropriate job
type.

Every job type has now it's own case despite multiple job types just
plainly cancelling the job for clarity and future extension.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_driver.c