mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
virsh: domain: remove unnecessary variable and label in cmdMigrateSetMaxDowntime()
Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0987edbedf
commit
bc7b8a34fa
@ -10988,25 +10988,19 @@ cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
|
|||||||
{
|
{
|
||||||
g_autoptr(virshDomain) dom = NULL;
|
g_autoptr(virshDomain) dom = NULL;
|
||||||
unsigned long long downtime = 0;
|
unsigned long long downtime = 0;
|
||||||
bool ret = false;
|
|
||||||
|
|
||||||
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
|
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (vshCommandOptULongLong(ctl, cmd, "downtime", &downtime) < 0)
|
if (vshCommandOptULongLong(ctl, cmd, "downtime", &downtime) < 0)
|
||||||
goto done;
|
return false;
|
||||||
|
|
||||||
if (downtime < 1) {
|
if (downtime < 1) {
|
||||||
vshError(ctl, "%s", _("migrate: Invalid downtime"));
|
vshError(ctl, "%s", _("migrate: Invalid downtime"));
|
||||||
goto done;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virDomainMigrateSetMaxDowntime(dom, downtime, 0) < 0)
|
return virDomainMigrateSetMaxDowntime(dom, downtime, 0) == 0;
|
||||||
goto done;
|
|
||||||
|
|
||||||
ret = true;
|
|
||||||
|
|
||||||
done:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user