提交 90d8454e 编写于 作者: E Eduardo Habkost 提交者: Anthony Liguori

QEMUFileCloseFunc: add return value documentation (v2)

qemu_fclose() and QEMUFile->close will return -errno on error, and any
positive value on success.

We need the positive non-zero success values because
migration-exec.c:exec_close() relies on non-zero return values to get
the process exit code.

Changes v1 -> v2:
 - Cosmetic spelling change on comment text
Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 c29110d5
......@@ -27,7 +27,13 @@ typedef int (QEMUFilePutBufferFunc)(void *opaque, const uint8_t *buf,
typedef int (QEMUFileGetBufferFunc)(void *opaque, uint8_t *buf,
int64_t pos, int size);
/* Close a file and return an error code */
/* Close a file
*
* Return negative error number on error, 0 or positive value on success.
*
* The meaning of return value on success depends on the specific back-end being
* used.
*/
typedef int (QEMUFileCloseFunc)(void *opaque);
/* Called to determine if the file has exceeded it's bandwidth allocation. The
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册