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

Function capget

src/backend/libc/thread/syscalls.rs:352–370  ·  view source on GitHub ↗
(
    header: &mut linux_raw_sys::general::__user_cap_header_struct,
    data: &mut [MaybeUninit<linux_raw_sys::general::__user_cap_data_struct>],
)

Source from the content-addressed store, hash-verified

350#[cfg(linux_kernel)]
351#[inline]
352pub(crate) fn capget(
353 header: &mut linux_raw_sys::general::__user_cap_header_struct,
354 data: &mut [MaybeUninit<linux_raw_sys::general::__user_cap_data_struct>],
355) -> io::Result<()> {
356 syscall! {
357 fn capget(
358 hdrp: *mut linux_raw_sys::general::__user_cap_header_struct,
359 data: *mut linux_raw_sys::general::__user_cap_data_struct
360 ) via SYS_capget -> c::c_int
361 }
362
363 unsafe {
364 ret(capget(
365 as_mut_ptr(header),
366 data.as_mut_ptr()
367 .cast::<linux_raw_sys::general::__user_cap_data_struct>(),
368 ))
369 }
370}
371
372#[cfg(linux_kernel)]
373#[inline]

Callers

nothing calls this directly

Calls 3

as_mut_ptrFunction · 0.85
retFunction · 0.50
as_mut_ptrMethod · 0.45

Tested by

no test coverage detected