yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 7074c0e6d1de6b9861e176ea70a2f16cd7a93df1 Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones@redhat.com>
Date: Thu, 11 Jun 2015 11:40:08 +0200
Subject: [PATCH 08/30] curl: Replaced old error handling with error reporting
 API.

Message-id: <1434022828-13037-2-git-send-email-rjones@redhat.com>
Patchwork-id: 65836
O-Subject: [RHEL-7.2 qemu-kvm v3 PATCH 01/21] curl: Replaced old error handling with error reporting API.
Bugzilla: 1226684
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>

From: Maria Kustova <maxa@catit.be>

Signed-off-by: Maria Kustova <maria.k@catit.be>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Upstream-status: acd7fdc6d80711371d7a1507a22438d9465da63c)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 block/curl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/curl.c b/block/curl.c
index b3d948e..a877dea 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -476,7 +476,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
     return 0;
 
 out:
-    fprintf(stderr, "CURL: Error opening file: %s\n", state->errmsg);
+    error_setg(errp, "CURL: Error opening file: %s", state->errmsg);
     curl_easy_cleanup(state->curl);
     state->curl = NULL;
 out_noclean:
-- 
1.8.3.1