mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-29 12:01:16 +00:00
qemu_process.c: remove 'cleanup' label from qemuProcessCreatePretendCmd()
The 'cleanup' flag is doing no cleaup in this function. We can remove it and return NULL on error or qemuBuildCommandLine(). Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
d8eb3ab9e1
commit
7a7d36055c
@ -7148,11 +7148,9 @@ qemuProcessCreatePretendCmd(virQEMUDriverPtr driver,
|
|||||||
bool standalone,
|
bool standalone,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virCommandPtr cmd = NULL;
|
virCheckFlags(VIR_QEMU_PROCESS_START_COLD |
|
||||||
|
VIR_QEMU_PROCESS_START_PAUSED |
|
||||||
virCheckFlagsGoto(VIR_QEMU_PROCESS_START_COLD |
|
VIR_QEMU_PROCESS_START_AUTODESTROY, NULL);
|
||||||
VIR_QEMU_PROCESS_START_PAUSED |
|
|
||||||
VIR_QEMU_PROCESS_START_AUTODESTROY, cleanup);
|
|
||||||
|
|
||||||
flags |= VIR_QEMU_PROCESS_START_PRETEND;
|
flags |= VIR_QEMU_PROCESS_START_PRETEND;
|
||||||
flags |= VIR_QEMU_PROCESS_START_NEW;
|
flags |= VIR_QEMU_PROCESS_START_NEW;
|
||||||
@ -7161,26 +7159,23 @@ qemuProcessCreatePretendCmd(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
if (qemuProcessInit(driver, vm, NULL, QEMU_ASYNC_JOB_NONE,
|
if (qemuProcessInit(driver, vm, NULL, QEMU_ASYNC_JOB_NONE,
|
||||||
!!migrateURI, flags) < 0)
|
!!migrateURI, flags) < 0)
|
||||||
goto cleanup;
|
return NULL;
|
||||||
|
|
||||||
if (qemuProcessPrepareDomain(driver, vm, flags) < 0)
|
if (qemuProcessPrepareDomain(driver, vm, flags) < 0)
|
||||||
goto cleanup;
|
return NULL;
|
||||||
|
|
||||||
VIR_DEBUG("Building emulator command line");
|
VIR_DEBUG("Building emulator command line");
|
||||||
cmd = qemuBuildCommandLine(driver,
|
return qemuBuildCommandLine(driver,
|
||||||
NULL,
|
NULL,
|
||||||
driver->securityManager,
|
driver->securityManager,
|
||||||
vm,
|
vm,
|
||||||
migrateURI,
|
migrateURI,
|
||||||
NULL,
|
NULL,
|
||||||
VIR_NETDEV_VPORT_PROFILE_OP_NO_OP,
|
VIR_NETDEV_VPORT_PROFILE_OP_NO_OP,
|
||||||
standalone,
|
standalone,
|
||||||
enableFips,
|
enableFips,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
cleanup:
|
|
||||||
return cmd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user