218e99
From 5332d8432cf1a751cb60793ba8e80e7540dce9c0 Mon Sep 17 00:00:00 2001
218e99
From: Max Reitz <mreitz@redhat.com>
218e99
Date: Mon, 4 Nov 2013 22:32:16 +0100
218e99
Subject: [PATCH 23/87] block/raw: Employ error parameter
218e99
218e99
RH-Author: Max Reitz <mreitz@redhat.com>
218e99
Message-id: <1383604354-12743-26-git-send-email-mreitz@redhat.com>
218e99
Patchwork-id: 55325
218e99
O-Subject: [RHEL-7.0 qemu-kvm PATCH 25/43] block/raw: Employ error parameter
218e99
Bugzilla: 1026524
218e99
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
218e99
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
218e99
RH-Acked-by: Fam Zheng <famz@redhat.com>
218e99
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
218e99
218e99
BZ: 1026524
218e99
218e99
Propagate errors in raw_create rather than directly reporting and
218e99
afterwards discarding them.
218e99
218e99
This downstream-only commit replaces upstream
218e99
92f1deec317230575726a8e0ab5c110781d30ec0 (which did the same for
218e99
raw_bsd.c instead of raw.c).
218e99
218e99
Signed-off-by: Max Reitz <mreitz@redhat.com>
218e99
---
218e99
 block/raw.c | 3 +--
218e99
 1 file changed, 1 insertion(+), 2 deletions(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 block/raw.c |    3 +--
218e99
 1 files changed, 1 insertions(+), 2 deletions(-)
218e99
218e99
diff --git a/block/raw.c b/block/raw.c
218e99
index 50073b6..66eda91 100644
218e99
--- a/block/raw.c
218e99
+++ b/block/raw.c
218e99
@@ -113,8 +113,7 @@ static int raw_create(const char *filename, QEMUOptionParameter *options,
218e99
 
218e99
     ret = bdrv_create_file(filename, options, &local_err);
218e99
     if (error_is_set(&local_err)) {
218e99
-        qerror_report_err(local_err);
218e99
-        error_free(local_err);
218e99
+        error_propagate(errp, local_err);
218e99
     }
218e99
     return ret;
218e99
 }
218e99
-- 
218e99
1.7.1
218e99