#
8be7e7e4 |
| 20-Mar-2012 |
Luiz Capitulino <lcapitulino@redhat.com> |
qemu-option: qemu_opts_create(): use error_set()
This commit converts qemu_opts_create() from qerror_report() to error_set().
Currently, most calls to qemu_opts_create() can't fail, so most callers
qemu-option: qemu_opts_create(): use error_set()
This commit converts qemu_opts_create() from qerror_report() to error_set().
Currently, most calls to qemu_opts_create() can't fail, so most callers don't need any changes.
The two cases where code checks for qemu_opts_create() erros are:
1. Initialization code in vl.c. All of them print their own error messages directly to stderr, no need to pass the Error object
2. The functions opts_parse(), qemu_opts_from_qdict() and qemu_chr_parse_compat() make use of the error information and they can be called from HMP or QMP. In this case, to allow for incremental conversion, we propagate the error up using qerror_report_err(), which keeps the QError semantics
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
show more ...
|
#
029409e5 |
| 10-May-2012 |
Amos Kong <akong@redhat.com> |
sockets: use error class to pass listen error
Add a new argument in inet_listen()/inet_listen_opts() to pass back listen error.
Change nbd, qemu-char, vnc to use new interface.
Signed-off-by: Amos
sockets: use error class to pass listen error
Add a new argument in inet_listen()/inet_listen_opts() to pass back listen error.
Change nbd, qemu-char, vnc to use new interface.
Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
a6ba35b3 |
| 10-May-2012 |
Amos Kong <akong@redhat.com> |
sockets: change inet_connect() to support nonblock socket
Add a bool argument to inet_connect() to assign if set socket to block/nonblock, and delete original argument 'socktype' that is unused. Add
sockets: change inet_connect() to support nonblock socket
Add a bool argument to inet_connect() to assign if set socket to block/nonblock, and delete original argument 'socktype' that is unused. Add a new argument to inet_connect()/inet_connect_opts(), to pass back connect error by error class.
Retry to connect when -EINTR is got. Connect's successful for nonblock socket when following errors are got, user should wait for connecting by select(): -EINPROGRESS -EWOULDBLOCK (win32) -WSAEALREADY (win32)
Change nbd, vnc to use new interface.
Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
877691f9 |
| 07-Feb-2012 |
Markus Armbruster <armbru@redhat.com> |
sockets: Clean up inet_listen_opts()'s convoluted bind() loop
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
#
136faa36 |
| 07-Feb-2012 |
Markus Armbruster <armbru@redhat.com> |
sockets: Drop sockets_debug debug code
I'm trying to improve this code's error reporting, and the debug code is getting in my way: it clutters the code, it clobbers errno in inconvenient places, and
sockets: Drop sockets_debug debug code
I'm trying to improve this code's error reporting, and the debug code is getting in my way: it clutters the code, it clobbers errno in inconvenient places, and it uses the same fprintf() both for error reporting and debug output in a few places.
Get rid of it. Once decent error reporting is in place, adding back whatever debug code we need shouldn't be hard.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
9d947472 |
| 11-Nov-2011 |
Markus Armbruster <armbru@redhat.com> |
qemu-sockets: Plug fd leak on unix_connect_opts() error path
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
#
7267c094 |
| 21-Aug-2011 |
Anthony Liguori <aliguori@us.ibm.com> |
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
#
b82eac92 |
| 22-Feb-2011 |
Nick Thomas <nick@bytemark.co.uk> |
Set errno=ENOTSUP for attempts to use UNIX sockets on Windows platforms
Signed-off-by: Nick Thomas <nick@bytemark.co.uk> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
#
e23a22e6 |
| 12-Apr-2010 |
Jens Osterkamp <jens@linux.vnet.ibm.com> |
qemu-sockets: avoid strlen of NULL pointer
If the user wants to create a chardev of type socket but forgets to give a host= option, qemu_opt_get returns NULL. This NULL pointer is then fed into strl
qemu-sockets: avoid strlen of NULL pointer
If the user wants to create a chardev of type socket but forgets to give a host= option, qemu_opt_get returns NULL. This NULL pointer is then fed into strlen a few lines below without a check which results in a segfault. This fixes it.
Signed-off-by: Jens Osterkamp <jens@linux.vnet.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
show more ...
|
#
0706a4dc |
| 01-Apr-2010 |
Paolo Bonzini <pbonzini@redhat.com> |
move socket_init to qemu-sockets.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
#
2198a62e |
| 09-Feb-2010 |
Marcelo Tosatti <mtosatti@redhat.com> |
fix inet_parse typo
qemu_opt_set wants on/off, not yes/no.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
#
c445321e |
| 20-Jan-2010 |
Luiz Capitulino <lcapitulino@redhat.com> |
net: inet_strfamily(): Better unknown family report
Returning "????" is a bit meaningless, let's call it "unknown".
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Li
net: inet_strfamily(): Better unknown family report
Returning "????" is a bit meaningless, let's call it "unknown".
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
c9c4b34e |
| 20-Jan-2010 |
Luiz Capitulino <lcapitulino@redhat.com> |
net: Make inet_strfamily() public
So that it can be used by other subsystems.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
#
40ff6d7e |
| 02-Dec-2009 |
Kevin Wolf <kwolf@redhat.com> |
Don't leak file descriptors
We're leaking file descriptors to child processes. Set FD_CLOEXEC on file descriptors that don't need to be passed to children to stop this misbehaviour.
Signed-off-by:
Don't leak file descriptors
We're leaking file descriptors to child processes. Set FD_CLOEXEC on file descriptors that don't need to be passed to children to stop this misbehaviour.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
c1390903 |
| 12-Sep-2009 |
Blue Swirl <blauwirbel@gmail.com> |
Add 'static'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
#
72cf2d4f |
| 12-Sep-2009 |
Blue Swirl <blauwirbel@gmail.com> |
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts w
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts with system headers on BSD systems. Some hacks have been introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896, f40d753718c72693c5f520f0d9899f6e50395e94, 96555a96d724016e13190b28cffa3bc929ac60dc and 3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile.
Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
show more ...
|
#
7e1b35b4 |
| 10-Sep-2009 |
Gerd Hoffmann <kraxel@redhat.com> |
convert udp chardev to QemuOpts.
While being at it: create a new inet_dgram_opts() function for udp setup, so udp can handle IPv6 now.
new cmd line syntax: -chardev udp,id=name,host=remotehost,
convert udp chardev to QemuOpts.
While being at it: create a new inet_dgram_opts() function for udp setup, so udp can handle IPv6 now.
new cmd line syntax: -chardev udp,id=name,host=remotehost,port=remoteport,\ localaddr=bindaddr,localport=bindport
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
e5bc776f |
| 10-Sep-2009 |
Gerd Hoffmann <kraxel@redhat.com> |
sockets: add inet_listen_opts
Add inet_listen_opts(). Does the same as inet_listen(), but uses QemuOpts. inet_listen() is a compatibility wrapper for inet_listen_opts() now and should go away some
sockets: add inet_listen_opts
Add inet_listen_opts(). Does the same as inet_listen(), but uses QemuOpts. inet_listen() is a compatibility wrapper for inet_listen_opts() now and should go away some day.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
f4c94c7c |
| 10-Sep-2009 |
Gerd Hoffmann <kraxel@redhat.com> |
sockets: add inet_connect_opts
Add inet_connect_opts(). Does the same as inet_connect(), but uses QemuOpts. inet_connect() is a compatibility wrapper for inet_connect_opts() now and should go away
sockets: add inet_connect_opts
Add inet_connect_opts(). Does the same as inet_connect(), but uses QemuOpts. inet_connect() is a compatibility wrapper for inet_connect_opts() now and should go away some day.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
108af7b9 |
| 10-Sep-2009 |
Gerd Hoffmann <kraxel@redhat.com> |
sockets: add unix_*_opts for windows.
Add unix_*_opts function dummys for windows.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
#
62b6adfb |
| 10-Sep-2009 |
Gerd Hoffmann <kraxel@redhat.com> |
sockets: add unix_listen_opts
Add unix_listen_opts(). Does the same as unix_listen(), but uses QemuOpts. unix_listen() is a compatibility wrapper for unix_listen_opts() now and should go away some
sockets: add unix_listen_opts
Add unix_listen_opts(). Does the same as unix_listen(), but uses QemuOpts. unix_listen() is a compatibility wrapper for unix_listen_opts() now and should go away some day.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
2af2bf67 |
| 10-Sep-2009 |
Gerd Hoffmann <kraxel@redhat.com> |
sockets: add unix_connect_opts
Add unix_connect_opts(). Does the same as unix_connect(), but uses QemuOpts. unix_connect() is a compatibility wrapper for unix_connect_opts() now and should go away
sockets: add unix_connect_opts
Add unix_connect_opts(). Does the same as unix_connect(), but uses QemuOpts. unix_connect() is a compatibility wrapper for unix_connect_opts() now and should go away some day.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
39b6efc8 |
| 06-May-2009 |
vibi <vibi_sreenivasan@cms.com> |
Fix in file qemu-sockets.c
1) Changed usage of malloc,free,strdup to qemu_malloc,qemu_free,qemu_strdup 2) Some coding style fixes (based on CODING_STYLE document) 3) Free struct addrinfo *res af
Fix in file qemu-sockets.c
1) Changed usage of malloc,free,strdup to qemu_malloc,qemu_free,qemu_strdup 2) Some coding style fixes (based on CODING_STYLE document) 3) Free struct addrinfo *res after failure of listen
Signed-off-by: vibi <vibi_sreenivasan@cms.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
bc575e95 |
| 14-Jan-2009 |
blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> |
Fix some more warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6300 c046a42c-6fe2-441c-8c8c-71466251a162
|
#
47398b9c |
| 22-Nov-2008 |
blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> |
Use qemu_isfoobar and qemu_towombat versions, based on patch by Christoph Egger
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5774 c046a42c-6fe2-441c-8c8c-71466251a162
|