mbox series

[v2,0/2] tools/nolibc: add support for directory access

Message ID 20250209-nolibc-dir-v2-0-57cc1da8558b@weissschuh.net (mailing list archive)
Headers show
Series tools/nolibc: add support for directory access | expand

Message

Thomas Weißschuh Feb. 9, 2025, 1:25 p.m. UTC
Add support opendir(), readdir_r(), closedir() and friends.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Changes in v2:
- Move definitions to dirent.h
- Reserve space for the trailing NULL byte of d_name
- Implement readdir_r() instead of readdir()
- Expand commit message
- Link to v1: https://lore.kernel.org/r/20250130-nolibc-dir-v1-0-ea9950b52e29@weissschuh.net

---
Thomas Weißschuh (2):
      tools/nolibc: add support for sys_llseek()
      tools/nolibc: add support for directory access

 tools/include/nolibc/Makefile                |  1 +
 tools/include/nolibc/dirent.h                | 98 ++++++++++++++++++++++++++++
 tools/include/nolibc/nolibc.h                |  1 +
 tools/include/nolibc/sys.h                   | 29 +++++++-
 tools/testing/selftests/nolibc/nolibc-test.c | 39 +++++++++++
 5 files changed, 167 insertions(+), 1 deletion(-)
---
base-commit: c1f4a7a84037249d086a4114c0c4332a260e9091
change-id: 20250130-nolibc-dir-980c2e2b661a

Best regards,

Comments

Willy Tarreau Feb. 9, 2025, 3:43 p.m. UTC | #1
On Sun, Feb 09, 2025 at 02:25:44PM +0100, Thomas Weißschuh wrote:
> Add support opendir(), readdir_r(), closedir() and friends.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Changes in v2:
> - Move definitions to dirent.h
> - Reserve space for the trailing NULL byte of d_name
> - Implement readdir_r() instead of readdir()
> - Expand commit message
> - Link to v1: https://lore.kernel.org/r/20250130-nolibc-dir-v1-0-ea9950b52e29@weissschuh.net

Nice!

Acked-by: Willy Tarreau <w@1wt.eu>

Willy