summaryrefslogtreecommitdiff
path: root/qga/channel-posix.c
AgeCommit message (Collapse)AuthorFilesLines
2013-01-14qemu-ga: Handle errors uniformely in ga_channel_open()Markus Armbruster1-4/+7
We detect errors in several places. One reports with g_error(), which calls abort(), the others report with g_critical(). Three of them exit(), three return false. Always report with g_critical(), and return false. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> *minor fix-up of commit msg Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: Plug fd leak on ga_channel_open() error pathsMarkus Armbruster1-0/+1
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: Plug fd leak on ga_channel_listen_accept() error pathMarkus Armbruster1-0/+1
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-11qga/channel-posix.c: Explicitly include string.hPeter Maydell1-0/+1
Explicitly include string.h to avoid warnings under MacOS X/clang about implicit declarations of strerror() and strlen(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini1-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-06qga/channel-posix.c: Include headers it needsEduardo Habkost1-0/+5
Include: - <errno.h> for errno - <unistd.h> & <fcntl.h> for fcntl() - <stdlib.h> for exit() - "osdep.h" for qemu_open() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-23qemu-ga: ask and print error information from qemu-socketsPaolo Bonzini1-3/+5
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-23qemu-sockets: add Error ** to all functionsPaolo Bonzini1-1/+1
This lets me adjust the clients to do proper error propagation first, thus avoiding temporary regressions in the quality of the error messages. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-05-01qemu-ga: Implement alternative to O_ASYNCAndreas Färber1-1/+17
ga_channel_open() was using open flag O_ASYNC for SIGIO-driven I/O. This breaks on illumos, so fall back to POSIX I_SETSIG ioctl (SIGPOLL). Signed-off-by: Lee Essen <lee.essen@nowonline.co.uk> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-23qemu-ga: move channel/transport functionality into wrapper classMichael Roth1-0/+246
This is mostly in preparation for the win32 port, which won't use GIO channels for reasons that will be made clearer later. Here the GAChannel class is just a loose wrapper around GIOChannel calls/callbacks, but we also roll in the logic/configuration for various channel types and managing unix socket connections, which makes the abstraction much more complete and further aids in the win32 port since isa-serial/unix-listen will not be supported initially. There's also a bit of refactoring in the main logic to consolidate the exit paths so we can do common cleanup for things like pid files, which weren't always cleaned up previously.