aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2014-10-30 11:05:13 +0300
committerMichael Tokarev <mjt@tls.msk.ru>2014-11-02 10:04:34 +0300
commit7d5a8435baed70f03bbe791aba12f5586ba17d75 (patch)
tree53340e73c7e34797aab8c35bab444a14d086868c /hw/9pfs
parent6af76c6f7dbcc6255f5a5cac20ad61d1492d4052 (diff)
virtio-9p-proxy: improve error messages in connect_namedsocket()
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Diffstat (limited to 'hw/9pfs')
-rw-r--r--hw/9pfs/virtio-9p-proxy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/9pfs/virtio-9p-proxy.c b/hw/9pfs/virtio-9p-proxy.c
index 2ec211bbea..59c7445dea 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;
}