Skip to content

Commit

Permalink
Unrolled build for rust-lang#115984
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#115984 - hermit-os:fuse, r=m-ou-se

extending filesystem support for Hermit

Extending `std` to create, change and read a directory for Hermit.

Hermit is a tier 3 platform and this PR changes only files, wich are related to the tier 3 platform.
  • Loading branch information
rust-timer committed Apr 8, 2024
2 parents 75fd074 + b1c7804 commit 6db7307
Show file tree
Hide file tree
Showing 3 changed files with 251 additions and 103 deletions.
5 changes: 5 additions & 0 deletions library/std/src/sys/pal/hermit/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ impl FileDesc {
pub fn set_nonblocking(&self, _nonblocking: bool) -> io::Result<()> {
unsupported()
}

pub fn fstat(&self, stat: *mut abi::stat) -> io::Result<()> {
cvt(unsafe { abi::fstat(self.fd.as_raw_fd(), stat) })?;
Ok(())
}
}

impl<'a> Read for &'a FileDesc {
Expand Down
Loading

0 comments on commit 6db7307

Please sign in to comment.