Skip to content

Commit b827aa0

Browse files
authored
Fix links to dirent struct in fd_readdir description (#274)
This commit fixes links in `fd_readdir` description/docs which were using an outdated (now invalid) ref syntax when referencing `dirent` struct. The changes apply to docs only and only to `wasi_unstable` and `wasi_snapshot_preview1` snapshots. The `wasi_ephemeral` has properly referenced links.
1 parent 68ef365 commit b827aa0

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

phases/old/snapshot_0/docs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ Size: 8
480480
Alignment: 8
481481

482482
## <a href="#dirnamlen" name="dirnamlen"></a> `dirnamlen`: `u32`
483-
The type for the $d_namlen field of $dirent.
483+
The type for the [`dirent::d_namlen`](#dirent.d_namlen) field of [`dirent`](#dirent) struct.
484484

485485
Size: 4
486486

@@ -1541,8 +1541,8 @@ The number of bytes read.
15411541
#### <a href="#fd_readdir" name="fd_readdir"></a> `fd_readdir(fd: fd, buf: Pointer<u8>, buf_len: size, cookie: dircookie) -> (errno, size)`
15421542
Read directory entries from a directory.
15431543
When successful, the contents of the output buffer consist of a sequence of
1544-
directory entries. Each directory entry consists of a dirent_t object,
1545-
followed by dirent_t::d_namlen bytes holding the name of the directory
1544+
directory entries. Each directory entry consists of a [`dirent`](#dirent) object,
1545+
followed by [`dirent::d_namlen`](#dirent.d_namlen) bytes holding the name of the directory
15461546
entry.
15471547
This function fills the output buffer as much as possible, potentially
15481548
truncating the last directory entry. This allows the caller to grow its

phases/old/snapshot_0/witx/typenames.witx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
;;; A reference to the offset of a directory entry.
318318
(typename $dircookie u64)
319319

320-
;;; The type for the $d_namlen field of $dirent.
320+
;;; The type for the `dirent::d_namlen` field of `dirent` struct.
321321
(typename $dirnamlen u32)
322322

323323
;;; File serial number that is unique within its file system.

phases/old/snapshot_0/witx/wasi_unstable.witx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@
222222

223223
;;; Read directory entries from a directory.
224224
;;; When successful, the contents of the output buffer consist of a sequence of
225-
;;; directory entries. Each directory entry consists of a dirent_t object,
226-
;;; followed by dirent_t::d_namlen bytes holding the name of the directory
225+
;;; directory entries. Each directory entry consists of a `dirent` object,
226+
;;; followed by `dirent::d_namlen` bytes holding the name of the directory
227227
;;; entry.
228228
;;
229229
;;; This function fills the output buffer as much as possible, potentially

phases/snapshot/docs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ Size: 8
482482
Alignment: 8
483483

484484
## <a href="#dirnamlen" name="dirnamlen"></a> `dirnamlen`: `u32`
485-
The type for the $d_namlen field of $dirent.
485+
The type for the [`dirent::d_namlen`](#dirent.d_namlen) field of [`dirent`](#dirent) struct.
486486

487487
Size: 4
488488

@@ -1538,8 +1538,8 @@ The number of bytes read.
15381538
#### <a href="#fd_readdir" name="fd_readdir"></a> `fd_readdir(fd: fd, buf: Pointer<u8>, buf_len: size, cookie: dircookie) -> (errno, size)`
15391539
Read directory entries from a directory.
15401540
When successful, the contents of the output buffer consist of a sequence of
1541-
directory entries. Each directory entry consists of a dirent_t object,
1542-
followed by dirent_t::d_namlen bytes holding the name of the directory
1541+
directory entries. Each directory entry consists of a [`dirent`](#dirent) object,
1542+
followed by [`dirent::d_namlen`](#dirent.d_namlen) bytes holding the name of the directory
15431543
entry.
15441544
This function fills the output buffer as much as possible, potentially
15451545
truncating the last directory entry. This allows the caller to grow its

phases/snapshot/witx/typenames.witx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
;;; The value 0 signifies the start of the directory.
320320
(typename $dircookie u64)
321321

322-
;;; The type for the $d_namlen field of $dirent.
322+
;;; The type for the `dirent::d_namlen` field of `dirent` struct.
323323
(typename $dirnamlen u32)
324324

325325
;;; File serial number that is unique within its file system.

phases/snapshot/witx/wasi_snapshot_preview1.witx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@
219219

220220
;;; Read directory entries from a directory.
221221
;;; When successful, the contents of the output buffer consist of a sequence of
222-
;;; directory entries. Each directory entry consists of a dirent_t object,
223-
;;; followed by dirent_t::d_namlen bytes holding the name of the directory
222+
;;; directory entries. Each directory entry consists of a `dirent` object,
223+
;;; followed by `dirent::d_namlen` bytes holding the name of the directory
224224
;;; entry.
225225
;;
226226
;;; This function fills the output buffer as much as possible, potentially

0 commit comments

Comments
 (0)