]> git.proxmox.com Git - qemu.git/commitdiff
documentation: qemu_write_full don't work with non-blocking fd's
authorJuan Quintela <quintela@redhat.com>
Thu, 4 Mar 2010 09:00:39 +0000 (10:00 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 9 Mar 2010 17:23:00 +0000 (11:23 -0600)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
osdep.c

diff --git a/osdep.c b/osdep.c
index 5bf3c00fd115cd683f665bb1af670c59fab7b8b6..abbc8a2381a0d84b535a44c9264384c3c9cb6084 100644 (file)
--- a/osdep.c
+++ b/osdep.c
@@ -261,6 +261,11 @@ int qemu_open(const char *name, int flags, ...)
  *
  * Return the number of bytes transferred.
  * Set errno if fewer than `count' bytes are written.
+ *
+ * This function don't work with non-blocking fd's.
+ * Any of the possibilities with non-bloking fd's is bad:
+ *   - return a short write (then name is wrong)
+ *   - busy wait adding (errno == EAGAIN) to the loop
  */
 ssize_t qemu_write_full(int fd, const void *buf, size_t count)
 {