Blame SOURCES/0055-lib-Return-EPIPE-for-appliance-closed-the-connection.patch

a30de4
From ef4efa57d1c0fffe4d81ea70ad8f44d07667cfeb Mon Sep 17 00:00:00 2001
a30de4
From: "Richard W.M. Jones" <rjones@redhat.com>
a30de4
Date: Fri, 3 Mar 2017 10:14:20 +0000
a30de4
Subject: [PATCH] lib: Return EPIPE for "appliance closed the connection
a30de4
 unexpectedly".
a30de4
a30de4
(cherry picked from commit 8af9acd4e31e9880e14735b2242c496ee017c0d9)
a30de4
---
a30de4
 lib/errors.c | 13 ++++++++-----
a30de4
 1 file changed, 8 insertions(+), 5 deletions(-)
a30de4
a30de4
diff --git a/lib/errors.c b/lib/errors.c
a30de4
index c2af611ee..ace6a89cf 100644
a30de4
--- a/lib/errors.c
a30de4
+++ b/lib/errors.c
a30de4
@@ -358,12 +358,15 @@ void
a30de4
 guestfs_int_unexpected_close_error (guestfs_h *g)
a30de4
 {
a30de4
   if (g->verbose)
a30de4
-    error (g, _("appliance closed the connection unexpectedly, see earlier error messages"));
a30de4
+    guestfs_int_error_errno (g, EPIPE,
a30de4
+                             _("appliance closed the connection unexpectedly, "
a30de4
+                               "see earlier error messages"));
a30de4
   else
a30de4
-    error (g, _(
a30de4
-		"appliance closed the connection unexpectedly.\n"
a30de4
-		"This usually means the libguestfs appliance crashed.\n"
a30de4
-		DEBUG_ADVICE));
a30de4
+    guestfs_int_error_errno (g, EPIPE,
a30de4
+                             _("appliance closed the connection unexpectedly.\n"
a30de4
+                               "This usually means the libguestfs appliance "
a30de4
+                               "crashed.\n"
a30de4
+                               DEBUG_ADVICE));
a30de4
 }
a30de4
 
a30de4
 /**
a30de4
-- 
a30de4
2.14.3
a30de4