Skip to contentSkip to conversation

qemu-file: use fwrite() correctly (take II)

PATCH In review Juan Quintela 2 participants 2 messages Mar 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-file: use fwrite() correctly (take II)

Simple minds like mine can't understand neither fwrite, or comments when there are 3 versions of a patch. The integrated patch is missing this bit.

---

I added Reviewed-by: by Eric & Markus because they acked the version with this change in.

 qemu-file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-file.c +1 -1
index f074af1..e5ec798 100644
@@ -105,7 +105,7 @@ static int stdio_put_buffer(void *opaque, const uint8_t *buf, int64_t pos,
     res = fwrite(buf, 1, size, s->stdio_file);
 
     if (res != size) {
-        return -EIO;	/* fake errno value */
+        return -errno;
     }
     return res;
 }
Signature · 1 line
1.8.5.3
#1 lore raw
Quoted 11 lines · Juan Quintela

Simple minds like mine can't understand neither fwrite, or comments when there are 3 versions of a patch. The integrated patch is missing this bit.

---

I added Reviewed-by: by Eric & Markus because they acked the version with this change in.

Also posted here:
https://lists.nongnu.org/archive/html/qemu-devel/2014-02/msg04902.html

but indeed, we want this patch in sooner rather than later, since misapplied patches can be a nightmare to track down later (such as in backporting efforts).

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org