Skip to content

Commit beaca9c

Browse files
authored
Rollup merge of #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.
2 parents 0e5f520 + b1c7804 commit beaca9c

File tree

3 files changed

+251
-103
lines changed

3 files changed

+251
-103
lines changed

library/std/src/sys/pal/hermit/fd.rs

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ impl FileDesc {
4848
pub fn set_nonblocking(&self, _nonblocking: bool) -> io::Result<()> {
4949
unsupported()
5050
}
51+
52+
pub fn fstat(&self, stat: *mut abi::stat) -> io::Result<()> {
53+
cvt(unsafe { abi::fstat(self.fd.as_raw_fd(), stat) })?;
54+
Ok(())
55+
}
5156
}
5257

5358
impl<'a> Read for &'a FileDesc {

0 commit comments

Comments
 (0)