From 79f9a4c9fbaf3f749f95619ace6730e9ff529735 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 24 Apr 2021 22:47:40 +0200 Subject: Update dir_readdir from [hurd]/hurd/fs.defs --- hurd/interface/fs/19.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hurd/interface/fs/19.mdwn b/hurd/interface/fs/19.mdwn index 86625d44..2a50d3e0 100644 --- a/hurd/interface/fs/19.mdwn +++ b/hurd/interface/fs/19.mdwn @@ -23,7 +23,10 @@ License|/fdl]]."]]"""]] Read entries from the directory. Each entry is identified by an index number starting at 0 and running through the file. This call fetches `nentries` (or any convenient number if `nentries` is -1) entries starting at `entry`, -returning an array of struct directs in `data`. The number of entries +returning a series of struct dirent in `data`. +Note that due to the variable-size `d_name` field, `d_reclen` has to be used to +jump from one struct dirent to the other. +The number of entries successfully read is returned in `amount`. If `entry` is bigger than the index of the last entry, then 0 is returned in `amount`. If `bufsize` is nonzero, never return more than `bufsize` bytes of data regardless. -- cgit v1.2.3