qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH] virtio-9p-proxy: improve error messages in connec


From: Michael Tokarev
Subject: [Qemu-trivial] [PATCH] virtio-9p-proxy: improve error messages in connect_namedsocket()
Date: Thu, 30 Oct 2014 11:06:18 +0300

Signed-off-by: Michael Tokarev <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]