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

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