mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
qemu: Rename ret variable in qemuProcessStart
Generally, we use "ret" variable for storing the value we are going to return at the and of a function, but this is not the case in qemuProcessStart. Let's rename "ret" as "rv". Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
7404c40597
commit
93df3a9748
@ -4365,7 +4365,7 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
virNetDevVPortProfileOp vmop,
|
||||
unsigned int flags)
|
||||
{
|
||||
int ret;
|
||||
int rv;
|
||||
off_t pos = -1;
|
||||
char ebuf[1024];
|
||||
int logfile = -1;
|
||||
@ -4846,15 +4846,15 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
|
||||
if (virSecurityManagerPreFork(driver->securityManager) < 0)
|
||||
goto error;
|
||||
ret = virCommandRun(cmd, NULL);
|
||||
rv = virCommandRun(cmd, NULL);
|
||||
virSecurityManagerPostFork(driver->securityManager);
|
||||
|
||||
/* wait for qemu process to show up */
|
||||
if (ret == 0) {
|
||||
if (rv == 0) {
|
||||
if (virPidFileReadPath(priv->pidfile, &vm->pid) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Domain %s didn't show up"), vm->def->name);
|
||||
ret = -1;
|
||||
rv = -1;
|
||||
}
|
||||
VIR_DEBUG("QEMU vm=%p name=%s running with pid=%llu",
|
||||
vm, vm->def->name, (unsigned long long)vm->pid);
|
||||
@ -4921,10 +4921,10 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
if (migrateFrom)
|
||||
flags |= VIR_QEMU_PROCESS_START_PAUSED;
|
||||
|
||||
if (ret == -1) /* The VM failed to start; tear filters before taps */
|
||||
if (rv == -1) /* The VM failed to start; tear filters before taps */
|
||||
virDomainConfVMNWFilterTeardown(vm);
|
||||
|
||||
if (ret == -1) /* The VM failed to start */
|
||||
if (rv == -1) /* The VM failed to start */
|
||||
goto error;
|
||||
|
||||
VIR_DEBUG("Setting cgroup for emulator (if required)");
|
||||
@ -4940,8 +4940,8 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
goto error;
|
||||
|
||||
/* Failure to connect to agent shouldn't be fatal */
|
||||
if ((ret = qemuConnectAgent(driver, vm)) < 0) {
|
||||
if (ret == -2)
|
||||
if ((rv = qemuConnectAgent(driver, vm)) < 0) {
|
||||
if (rv == -2)
|
||||
goto error;
|
||||
|
||||
VIR_WARN("Cannot connect to QEMU guest agent for %s",
|
||||
|
Loading…
Reference in New Issue
Block a user