Hi Stefan On Tue, Apr 26, 2022 at 6:33 PM Stefan Hajnoczi <stefa...@gmail.com> wrote:
> On Tue, Apr 26, 2022 at 01:27:15PM +0400, marcandre.lur...@redhat.com > wrote: > > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > > > The qemu_*block() functions are meant to be be used with sockets (the > > win32 implementation expects SOCKET) > > > > Over time, those functions where used with Win32 SOCKET or > > file-descriptors interchangeably. But for portability, they must only be > > used with socket-like file-descriptors. FDs can use > > g_unix_set_fd_nonblocking() instead. > > > > Rename the functions with "socket" in the name to prevent bad usages. > > > > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > > --- > > include/qemu/sockets.h | 6 +++--- > > chardev/char-socket.c | 2 +- > > contrib/ivshmem-server/ivshmem-server.c | 2 +- > > hw/hyperv/syndbg.c | 2 +- > > hw/virtio/vhost-user.c | 2 +- > > io/channel-socket.c | 6 +++--- > > net/l2tpv3.c | 2 +- > > net/socket.c | 10 +++++----- > > qga/channel-posix.c | 2 +- > > tests/unit/socket-helpers.c | 2 +- > > tests/unit/test-crypto-tlssession.c | 8 ++++---- > > util/oslib-posix.c | 8 ++++---- > > util/oslib-win32.c | 8 ++++---- > > util/vhost-user-server.c | 4 ++-- > > 14 files changed, 32 insertions(+), 32 deletions(-) > > Thanks for fixing this! > > Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> > Thanks, could you also review the preliminary patches 19-25 ? They reduce the usage of qemu_socket* functions, and use glib API instead. -- Marc-André Lureau