From 5d5634056841fa4a47b6e6f74d2fcd0341c1267e Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Wed, 10 Apr 2024 17:28:02 +0200 Subject: [PATCH] vfs_lxip: return WRITE_ERR_WOULD_BLOCK on EAGAIN Because all operations in lxip are non-blocking, return WRITE_ERR_WOULD_BLOCK for data writes as done by read. Note: This was not the case in the old plugin because 'write' was blocking operation there. issue #5165 --- repos/dde_linux/src/lib/vfs/lxip/vfs.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc index 01deb5fa16..2e6b43fe42 100644 --- a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc +++ b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc @@ -475,10 +475,9 @@ class Vfs::Lxip_data_file final : public Vfs::Lxip_file _write_err = genode_socket_sendmsg(&_sock, msg_send.header(), &bytes_sent); - /* TODO: propagate EAGAIN + /* propagate EAGAIN */ if (_write_err == GENODE_EAGAIN) throw Would_block(); - */ return _write_err == GENODE_ENONE ? bytes_sent : -1; }