qemu-cr16/include
Vladimir Sementsov-Ogievskiy 8cb17f9c36 util: drop qemu_socket_set_nonblock()
Use common qemu_set_blocking() instead.

Note that pre-patch the behavior of Win32 and Linux realizations
are inconsistent: we ignore failure for Win32, and assert success
for Linux.

How do we convert the callers?

1. Most of callers call qemu_socket_set_nonblock() on a
freshly created socket fd, in conditions when we may simply
report an error. Seems correct switching to error handling
both for Windows (pre-patch error is ignored) and Linux
(pre-patch we assert success). Anyway, we normally don't
expect errors in these cases.

Still in tests let's use &error_abort for simplicity.

What are exclusions?

2. hw/virtio/vhost-user.c - we are inside #ifdef CONFIG_LINUX,
so no damage in switching to error handling from assertion.

3. io/channel-socket.c: here we convert both old calls to
qemu_socket_set_nonblock() and qemu_socket_set_block() to
one new call. Pre-patch we assert success for Linux in
qemu_socket_set_nonblock(), and ignore all other errors here.
So, for Windows switch is a bit dangerous: we may get
new errors or crashes(when error_abort is passed) in
cases where we have silently ignored the error before
(was it correct in all such cases, if they were?) Still,
there is no other way to stricter API than take
this risk.

4. util/vhost-user-server - compiled only for Linux (see
util/meson.build), so we are safe, switching from assertion to
&error_abort.

Note: In qga/channel-posix.c we use g_warning(), where g_printerr()
would actually be a better choice. Still let's for now follow
common style of qga, where g_warning() is commonly used to print
such messages, and no call to g_printerr(). Converting everything
to use g_printerr() should better be another series.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-09-19 12:46:07 +01:00
..
accel accel/tcg: Add cpu_atomic_*_mmu for 16-byte xchg, fetch_and, fetch_or 2025-08-30 16:37:23 +01:00
authz
block blockjob: mark block_job_remove_all_bdrv() as GRAPH_UNLOCKED 2025-07-14 15:42:28 +02:00
chardev chardev/char-hub: implement backend chardev aggregator 2025-02-03 13:57:08 +04:00
crypto crypto/hmac: Allow to build hmac over multiple qcrypto_gnutls_hmac_bytes[v] calls 2025-09-02 17:58:05 +02:00
disas disas: Fix build against Capstone v6 (again) 2024-11-05 10:09:59 +00:00
exec include/exec/target_page.h: move page-target.c to header 2025-09-02 17:57:05 +02:00
fpu fpu: Move m68k_denormal fmt flag into floatx80_behaviour 2025-02-25 15:32:57 +00:00
gdbstub gdbstub/helpers: Replace TARGET_BIG_ENDIAN -> target_big_endian() 2025-07-15 02:56:39 -04:00
hw * cpu-exec: more cleanups to CPU loop exits 2025-09-18 07:05:59 -07:00
io treewide: handle result of qio_channel_set_blocking() 2025-09-19 12:46:07 +01:00
libdecnumber include/libdecnumber: replace FSF postal address with licenses URL 2025-06-26 00:42:37 +02:00
migration migration: Rename save_live_complete_precopy_thread to save_complete_precopy_thread 2025-07-11 10:37:39 -03:00
monitor monitor: Remove obsolete stubs 2024-06-30 19:51:44 +03:00
net virtio,pci,pc: features, fixes, tests 2025-07-16 07:00:47 -04:00
qapi util/error: make func optional 2025-06-05 20:24:51 +02:00
qemu util: drop qemu_socket_set_nonblock() 2025-09-19 12:46:07 +01:00
qobject qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
qom qom: reverse order of instance_post_init calls 2025-05-20 08:18:53 +02:00
scsi
semihosting semihosting/uaccess: Remove uses of target_ulong type 2025-07-02 10:09:48 +01:00
standard-headers update Linux headers to v6.16-rc3 2025-06-20 13:25:59 +02:00
system * cpu-exec: more cleanups to CPU loop exits 2025-09-18 07:05:59 -07:00
tcg tcg: Add tcg_gen_atomic_{xchg,fetch_and,fetch_or}_i128 2025-08-30 16:37:24 +01:00
ui ui/gtk: Add scale option 2025-07-15 10:22:33 +04:00
user linux-user: Move target_cpu_copy_regs decl to qemu.h 2025-08-28 06:39:25 +10:00
elf.h elf: Add EF_MIPS_ARCH_ASE definitions 2025-09-02 17:57:05 +02:00
glib-compat.h include/glib-compat.h: Poison g_list_sort and g_slist_sort 2025-05-06 16:02:04 +02:00
qemu-io.h
qemu-main.h ui & main loop: Redesign of system-specific main thread event handling 2024-12-31 21:21:34 +01:00