MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / open_tree

Function open_tree

src/backend/libc/mount/syscalls.rs:88–102  ·  view source on GitHub ↗
(
    dfd: BorrowedFd<'_>,
    filename: &CStr,
    flags: super::types::OpenTreeFlags,
)

Source from the content-addressed store, hash-verified

86
87#[cfg(linux_kernel)]
88pub(crate) fn open_tree(
89 dfd: BorrowedFd<'_>,
90 filename: &CStr,
91 flags: super::types::OpenTreeFlags,
92) -> io::Result<OwnedFd> {
93 syscall! {
94 fn open_tree(
95 dfd: c::c_int,
96 filename: *const c::c_char,
97 flags: c::c_uint
98 ) via SYS_open_tree -> c::c_int
99 }
100
101 unsafe { ret_owned_fd(open_tree(borrowed_fd(dfd), c_str(filename), flags.bits())) }
102}
103
104#[cfg(linux_kernel)]
105pub(crate) fn fspick(

Callers

nothing calls this directly

Calls 3

borrowed_fdFunction · 0.85
c_strFunction · 0.85
ret_owned_fdFunction · 0.50

Tested by

no test coverage detected