Function pr_get_auxv_static

Source
fn pr_get_auxv_static(
    buffer: &mut [u8; 512],
) -> Result<&mut [u8], Result<usize>>
Expand description

Use Linux ≥ 6.4’s PR_GET_AUXV to read the aux records, into a provided statically-sized buffer. Return:

  • Ok(…) if the buffer is big enough.
  • Err(Ok(len)) if we need a buffer of length len.
  • Err(Err(err)) if we failed with err.