alexcrichton opened PR #14381 from alexcrichton:different-dirent-d-type-fallback to bytecodealliance:main:
This commit adjusts a fallback that happens when reading a directory and reporting the names/file-types of what's contained. Previously illumos would do a separate syscall to find the file type since the
direntdoesn't have the information and other platforms would use thed_typefield. Turns out though that apparently a number of filesystems also don't fill ind_typeso it's not uncommon to run into this. The WASI API, subjectively to me at least, is a best-effort way of letting the guest know the information that the host already has, so there's no need to be 100% accurate. Instead this changes the illumos syscall fallback to just always using theUnknownfile type which will also be consistent with what various filesystems on other Unix systems would report anyway too.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested pchickey for a review on PR #14381.
alexcrichton requested wasmtime-wasi-reviewers for a review on PR #14381.
:thumbs_up: pchickey submitted PR review.
alexcrichton has enabled auto merge for PR #14381.
alexcrichton added PR #14381 Tweak illumos fallback for file-type of directory entries to the merge queue.
:check: alexcrichton merged PR #14381.
alexcrichton removed PR #14381 Tweak illumos fallback for file-type of directory entries from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC