Skip to content

Commit a785689

Browse files
committed
feat: support fstat in linux
1 parent 6320d51 commit a785689

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/shims/unix/linux/foreign_items.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
5353
let result = this.linux_statx(dirfd, pathname, flags, mask, statxbuf)?;
5454
this.write_scalar(result, dest)?;
5555
}
56-
56+
"fstat" => {
57+
let [fd, buf] = this.check_shim_sig_lenient(abi, CanonAbi::C, link_name, args)?;
58+
let result = this.fstat(fd, buf)?;
59+
this.write_scalar(result, dest)?;
60+
}
5761
// epoll, eventfd
5862
"epoll_create1" => {
5963
let [flag] = this.check_shim_sig_lenient(abi, CanonAbi::C, link_name, args)?;

0 commit comments

Comments
 (0)