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

Function readlink

src/backend/linux_raw/fs/syscalls.rs:965–976  ·  view source on GitHub ↗
(path: &CStr, buf: &mut [u8])

Source from the content-addressed store, hash-verified

963#[cfg(feature = "alloc")]
964#[inline]
965pub(crate) fn readlink(path: &CStr, buf: &mut [u8]) -> io::Result<usize> {
966 let (buf_addr_mut, buf_len) = slice_mut(buf);
967 unsafe {
968 ret_usize(syscall!(
969 __NR_readlinkat,
970 raw_fd(AT_FDCWD),
971 path,
972 buf_addr_mut,
973 buf_len
974 ))
975 }
976}
977
978#[inline]
979pub(crate) unsafe fn readlinkat(

Callers

nothing calls this directly

Calls 2

slice_mutFunction · 0.85
ret_usizeFunction · 0.50

Tested by

no test coverage detected