qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 05/37] migration: If there is one error, it makes no


From: Juan Quintela
Subject: [Qemu-devel] [PATCH 05/37] migration: If there is one error, it makes no sense to continue
Date: Thu, 20 Oct 2011 02:11:45 +0200

Once there, add a comment about what each error mean.

Signed-off-by: Juan Quintela <address@hidden>
---
 buffered_file.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/buffered_file.c b/buffered_file.c
index 486af57..94ecbbc 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -189,13 +189,19 @@ static int buffered_close(void *opaque)
     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)
 {
     QEMUFileBuffered *s = opaque;

-    if (s->has_error)
-        return 0;
-
+    if (s->has_error) {
+        return -1;
+    }
     if (s->freeze_output)
         return 1;

-- 
1.7.6.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]