mirror of https://gitee.com/openkylin/qemu.git
migration: If there is one error, it makes no sense to continue
Once there, add a comment about what each error mean. Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
2350e13c93
commit
4fc7d8195f
|
@ -189,13 +189,19 @@ static int buffered_close(void *opaque)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The meaning of the return values is:
|
||||||
|
* 0: We can continue sending
|
||||||
|
* 1: Time to stop
|
||||||
|
* -1: There has been an error
|
||||||
|
*/
|
||||||
static int buffered_rate_limit(void *opaque)
|
static int buffered_rate_limit(void *opaque)
|
||||||
{
|
{
|
||||||
QEMUFileBuffered *s = opaque;
|
QEMUFileBuffered *s = opaque;
|
||||||
|
|
||||||
if (s->has_error)
|
if (s->has_error) {
|
||||||
return 0;
|
return -1;
|
||||||
|
}
|
||||||
if (s->freeze_output)
|
if (s->freeze_output)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue