All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] virtio-9p-proxy: improve error messages in connect_namedsocket()
@ 2014-10-30  8:06 ` Michael Tokarev
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2014-10-30  8:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, arei.gonglei, Michael Tokarev

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/9pfs/virtio-9p-proxy.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/9pfs/virtio-9p-proxy.c b/hw/9pfs/virtio-9p-proxy.c
index 2ec211b..59c7445 100644
--- a/hw/9pfs/virtio-9p-proxy.c
+++ b/hw/9pfs/virtio-9p-proxy.c
@@ -1104,14 +1104,14 @@ static int connect_namedsocket(const char *path)
 
     sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
     if (sockfd < 0) {
-        fprintf(stderr, "socket %s\n", strerror(errno));
+        fprintf(stderr, "failed to create socket: %s\n", strerror(errno));
         return -1;
     }
     strcpy(helper.sun_path, path);
     helper.sun_family = AF_UNIX;
     size = strlen(helper.sun_path) + sizeof(helper.sun_family);
     if (connect(sockfd, (struct sockaddr *)&helper, size) < 0) {
-        fprintf(stderr, "socket error\n");
+        fprintf(stderr, "failed to connect to %s: %s\n", path, strerror(errno));
         close(sockfd);
         return -1;
     }
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-30 10:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-30  8:06 [Qemu-trivial] [PATCH] virtio-9p-proxy: improve error messages in connect_namedsocket() Michael Tokarev
2014-10-30  8:06 ` [Qemu-devel] " Michael Tokarev
2014-10-30 10:52 ` [Qemu-trivial] " Gonglei
2014-10-30 10:52   ` [Qemu-devel] " Gonglei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.