yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 28c5321911bde483484eb95d0bef2e8e65a3593b Mon Sep 17 00:00:00 2001
From: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Date: Mon, 10 Mar 2014 17:41:44 +0100
Subject: [PATCH 16/16] qemu_file: Fix mismerge of "use fwrite() correctly"

RH-Author: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Message-id: <1394473304-7190-3-git-send-email-dgilbert@redhat.com>
Patchwork-id: 58074
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 2/2] qemu_file: Fix mismerge of "use fwrite() correctly"
Bugzilla: 1005103
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Eric Blake <eblake@redhat.com>
RH-Acked-by: Amit Shah <amit.shah@redhat.com>

From: Markus Armbruster <armbru@redhat.com>

Reviewers accepted v2 of the patch, but what got committed was v1,
with the R-bys for v2.  This is the v1->v2 followup fix.

[Amit:
 This fixes commit aded6539d983280212e08d09f14157b1cb4d58cc
]

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit ac4df4e608e84da135eacecd7bba7c6e9e9a63b7)

Conflicts:
	qemu-file.c
was still in savevm.c
---
 savevm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 savevm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/savevm.c b/savevm.c
index 94121a2..4d92a7b 100644
--- a/savevm.c
+++ b/savevm.c
@@ -216,7 +216,7 @@ static int stdio_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, int s
     res = fwrite(buf, 1, size, s->stdio_file);
 
     if (res != size) {
-        return -EIO;	/* fake errno value */
+        return -errno;
     }
     return res;
 }
-- 
1.7.1