mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
qemu: remove unreachable code in qemuProcessStart()
Back when the original version of this chunk of code was added (commit 41b087198 in libvirt-0.8.1 in April 2010), we used virExecDaemonize() to start the qemu process, and would continue on in the function (which at that time was called qemudStartVMDaemon()) even if a -1 was returned. So it was possible to get to this code with rv == -1 (it was called "ret" in that version of the code). In modern libvirt code, qemu is started with virCommandRun(); then we call virPidFileReadPath(); those are the only two ways of setting "rv" prior to this code being removed, and in either case if the new value of rv < 0, then we immediately skip over the rest of the code to the cleanup: label. This means that the code being removed by this patch is unreachable. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
db37396e41
commit
5cad64ec03
@ -6907,12 +6907,6 @@ qemuProcessLaunch(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
VIR_DEBUG("Handshake complete, child running");
|
||||
|
||||
if (rv == -1) {
|
||||
/* The VM failed to start; tear filters before taps */
|
||||
virDomainConfVMNWFilterTeardown(vm);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (qemuDomainObjStartWorker(vm) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user