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
This commit is contained in:
Sebastian Sumpf 2024-04-10 17:28:02 +02:00 committed by Christian Helmuth
parent 309a281b14
commit 5d56340568

View File

@ -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;
}