From e3e02e474e20461404154d847d478fc495cdea42 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 17 Feb 2011 12:57:01 -0200 Subject: [PATCH 1/3] Fix error message in drive_init RH-Author: Markus Armbruster Message-id: <1297947422-7513-2-git-send-email-armbru@redhat.com> Patchwork-id: 18399 O-Subject: [PATCH RHEL6.1 qemu-kvm 1/2] Fix error message in drive_init Bugzilla: 607598 RH-Acked-by: Avi Kivity RH-Acked-by: Jes Sorensen RH-Acked-by: Kevin Wolf The real error is the return value of bdrv_open. errno might be overwritten or not even set to that value in the first place. Signed-off-by: Kevin Wolf (cherry picked from commit 236f1f672ca4b5dea70c0c101036224297c53895) Conflicts: vl.c Signed-off-by: Markus Armbruster --- vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: Luiz Capitulino --- vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index d7d43b5..7de2152 100644 --- a/vl.c +++ b/vl.c @@ -2245,7 +2245,7 @@ static int drive_open(DriveInfo *dinfo) if (res < 0) { fprintf(stderr, "qemu: could not open disk image %s: %s\n", - dinfo->file, strerror(errno)); + dinfo->file, strerror(-res)); } return res; } -- 1.7.4.rc1.16.gd2f15e