aboutsummaryrefslogtreecommitdiff
path: root/qga/channel-posix.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-02 10:09:14 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-23 13:54:56 +0200
commit90119816e36ba019650214e7efeccdac1d4a9e32 (patch)
treef3ebb49e725b90ed47041d59c05b9f2237278ed4 /qga/channel-posix.c
parentf8430e7621b3319f6b94c735c811b2a2448cd6ea (diff)
downloadqemu-arm-90119816e36ba019650214e7efeccdac1d4a9e32.tar.gz
qemu-ga: ask and print error information from qemu-sockets
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qga/channel-posix.c')
-rw-r--r--qga/channel-posix.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/qga/channel-posix.c b/qga/channel-posix.c
index e22eee6f67..d152827bcf 100644
--- a/qga/channel-posix.c
+++ b/qga/channel-posix.c
@@ -181,9 +181,11 @@ static gboolean ga_channel_open(GAChannel *c, const gchar *path, GAChannelMethod
break;
}
case GA_CHANNEL_UNIX_LISTEN: {
- int fd = unix_listen(path, NULL, strlen(path), NULL);
- if (fd == -1) {
- g_critical("error opening path: %s", strerror(errno));
+ Error *local_err = NULL;
+ int fd = unix_listen(path, NULL, strlen(path), &local_err);
+ if (local_err != NULL) {
+ g_critical("%s", error_get_pretty(local_err));
+ error_free(local_err);
return false;
}
ga_channel_listen_add(c, fd, true);