nuttx/fs/v9fs
Marco Casaroli 3619c557a6 fs/v9fs: Report the end of a directory as the end, not as an error.
At the end of a directory the 9P server returns no entries.
v9fs_client_convertdir() then failed with -EIO, so readdir() returned
NULL with errno set to EIO at the end of every directory.  A program
that checks errno after readdir() reports an I/O error.

Return -ENOENT when the server returns no entries.  The VFS turns that
into a clean end of directory.  Also check the space for the fixed part
of an entry against the bytes left after head, not against the whole
buffer.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-10-09 06:12:58 -03:00
..
client.c fs/v9fs: Report the end of a directory as the end, not as an error. 2026-10-09 06:12:58 -03:00
client.h v9fs:socket driver 2025-01-20 17:12:14 +08:00
CMakeLists.txt v9fs:socket driver 2025-01-20 17:12:14 +08:00
Kconfig v9fs:socket driver 2025-01-20 17:12:14 +08:00
Make.defs v9fs:socket driver 2025-01-20 17:12:14 +08:00
socket_9p.c v9fs:socket driver 2025-01-20 17:12:14 +08:00
transport.c v9fs:socket driver 2025-01-20 17:12:14 +08:00
v9fs.c fs/v9fs: Report the end of a directory as the end, not as an error. 2026-10-09 06:12:58 -03:00
virtio_9p.c fs/v9fs: Do not copy the comma after the virtio tag. 2026-10-08 13:29:48 +08:00