mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
Use unsigned timeout in cmdMigrateSetMaxDowntime
While looking to implement a migrate-getmaxdowntime command (coming), I noticed that the setmaxdowntime is incorrectly looking at its parameter as a signed longlong. Not sure how that got past gcc, but here's a simple patch to make the command line parsing and the parameter to the worker functions all have the correct (unsigned) type. Signed-off-by: Scott Garfinkle <seg@us.ibm.com>
This commit is contained in:
parent
fde0dff6f4
commit
7432141c33
@ -10696,13 +10696,13 @@ static bool
|
|||||||
cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
|
cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
|
||||||
{
|
{
|
||||||
virDomainPtr dom = NULL;
|
virDomainPtr dom = NULL;
|
||||||
long long downtime = 0;
|
unsigned long long downtime = 0;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
|
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (vshCommandOptLongLong(ctl, cmd, "downtime", &downtime) < 0)
|
if (vshCommandOptULongLong(ctl, cmd, "downtime", &downtime) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (downtime < 1) {
|
if (downtime < 1) {
|
||||||
vshError(ctl, "%s", _("migrate: Invalid downtime"));
|
vshError(ctl, "%s", _("migrate: Invalid downtime"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user