Patchwork [resend,1/3] savevm: add comments for qemu_file_get_error()

login
register
mail settings
Submitter Lei Li
Date Aug. 23, 2013, 1:30 p.m.
Message ID <1377264653-31031-1-git-send-email-lilei@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/269453/
State New
Headers show

Comments

Lei Li - Aug. 23, 2013, 1:30 p.m.
Add comments for qemu_file_get_error(), as its return value
is not very clear.

Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
---
 savevm.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/savevm.c b/savevm.c
index 03fc4d9..95a11f9 100644
--- a/savevm.c
+++ b/savevm.c
@@ -566,6 +566,13 @@  QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops)
     return f;
 }
 
+/*
+ * Get last error for stream f
+ *
+ * Return negative error value if there has been an error on previous
+ * operations, return 0 if no error happened.
+ *
+ */
 int qemu_file_get_error(QEMUFile *f)
 {
     return f->last_error;