Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support std::fs::File::seek #652

Closed
m-mueller678 opened this issue Dec 16, 2024 · 4 comments · Fixed by rust-lang/rust#138074
Closed

Support std::fs::File::seek #652

m-mueller678 opened this issue Dec 16, 2024 · 4 comments · Fixed by rust-lang/rust#138074
Assignees

Comments

@m-mueller678
Copy link

std::sys::pal::hermit::fs::File::seek currently always return EINVAL.

@mkroening mkroening self-assigned this Dec 16, 2024
@jounathaen
Copy link
Member

For reference: Hermit already supports lseek, but apparently this is currently missing in the Rust stdlib. Here is the respective code:
https://github.com/rust-lang/rust/blob/7b31983d5506e975801963b88b36c504eb2cecd8/library/std/src/sys/pal/hermit/fs.rs#L425

@thaliaarchi
Copy link

This is blocked by lseek being added since the last release to hermit-abi. If a new release were published, though, I'd be happy to fix this on the Rust side.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 10, 2025
…nton

Support `File::seek` for Hermit

`lseek` was added in `hermit-abi` in commit [87dd201](hermit-os/hermit-rs@87dd201) (add missing interface for lseek, 2024-07-15), which was just released in version 0.5.0.

cc `@mkroening,` `@stlankes`

Fixes hermit-os/hermit-rs#652
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 10, 2025
…nton

Support `File::seek` for Hermit

`lseek` was added in `hermit-abi` in commit [87dd201](hermit-os/hermit-rs@87dd201) (add missing interface for lseek, 2024-07-15), which was just released in version 0.5.0.

cc ``@mkroening,`` ``@stlankes``

Fixes hermit-os/hermit-rs#652
jieyouxu added a commit to jieyouxu/rust that referenced this issue Mar 10, 2025
…nton

Support `File::seek` for Hermit

`lseek` was added in `hermit-abi` in commit [87dd201](hermit-os/hermit-rs@87dd201) (add missing interface for lseek, 2024-07-15), which was just released in version 0.5.0.

cc ```@mkroening,``` ```@stlankes```

Fixes hermit-os/hermit-rs#652
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 11, 2025
Rollup merge of rust-lang#138074 - thaliaarchi:hermit-seek, r=ChrisDenton

Support `File::seek` for Hermit

`lseek` was added in `hermit-abi` in commit [87dd201](hermit-os/hermit-rs@87dd201) (add missing interface for lseek, 2024-07-15), which was just released in version 0.5.0.

cc ``@mkroening,`` ``@stlankes``

Fixes hermit-os/hermit-rs#652
@thaliaarchi
Copy link

rust-lang/rust#138074 has been merged into Rust, so you'll have this available in nightly tomorrow :)

@mkroening
Copy link
Member

Thanks again! :)

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this issue Mar 14, 2025
…nton

Support `File::seek` for Hermit

`lseek` was added in `hermit-abi` in commit [87dd201](hermit-os/hermit-rs@87dd201) (add missing interface for lseek, 2024-07-15), which was just released in version 0.5.0.

cc ``@mkroening,`` ``@stlankes``

Fixes hermit-os/hermit-rs#652
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants