Skip to content

Commit

Permalink
Extending filesystem support for hermit-os
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschoening authored and mkroening committed Sep 19, 2023
1 parent e270fc7 commit 41907fb
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 98 deletions.
5 changes: 5 additions & 0 deletions library/std/src/sys/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 41907fb

Please sign in to comment.