Function
readlink
(path: &CStr, buf: &mut [u8])
Source from the content-addressed store, hash-verified
| 963 | #[cfg(feature = "alloc")] |
| 964 | #[inline] |
| 965 | pub(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] |
| 979 | pub(crate) unsafe fn readlinkat( |
Callers
nothing calls this directly
Tested by
no test coverage detected