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

Function fsconfig_set_binary

src/backend/libc/mount/syscalls.rs:163–177  ·  view source on GitHub ↗
(
    fs_fd: BorrowedFd<'_>,
    key: &CStr,
    value: &[u8],
)

Source from the content-addressed store, hash-verified

161
162#[cfg(linux_kernel)]
163pub(crate) fn fsconfig_set_binary(
164 fs_fd: BorrowedFd<'_>,
165 key: &CStr,
166 value: &[u8],
167) -> io::Result<()> {
168 unsafe {
169 ret(fsconfig(
170 borrowed_fd(fs_fd),
171 super::types::FsConfigCmd::SetBinary as _,
172 c_str(key),
173 value.as_ptr().cast(),
174 value.len().try_into().map_err(|_| io::Errno::OVERFLOW)?,
175 ))
176 }
177}
178
179#[cfg(linux_kernel)]
180pub(crate) fn fsconfig_set_fd(

Callers

nothing calls this directly

Calls 5

borrowed_fdFunction · 0.85
c_strFunction · 0.85
retFunction · 0.50
as_ptrMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected