]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_passt: Deduplicate passt killing code
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 16 Feb 2023 11:07:42 +0000 (12:07 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 20 Feb 2023 08:43:14 +0000 (09:43 +0100)
commite5bfc661bc181a36fa70250470554b20002fb84d
tree84070347e38883c055cd88c19adba98fce18a784
parent02355840ced2af18df1aa9ba387a6137a515eede
qemu_passt: Deduplicate passt killing code

There are two places where we kill passt:

1) qemuPasstStop() - called transitively from qemuProcessStop(),
2) qemuPasstStart() - after failed start.

Now, the code from 2) lack error preservation (so if there's
another error during cleanup we might overwrite the original
error). Therefore, move the internals of qemuPasstStop() into a
separate function and call it from both places.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/qemu/qemu_passt.c