mirror of https://github.com/aya-rs/aya
bpf: Change the result type of bpf_get_current_comm helper
Change it from `[i8; 16]` to `[u8; 18]`. `i8` arrays cannot be easily used in Rust for converting to string (i.e. with `core::str::from_utf8_unchecked`) and developers have to convert them themselves with unsafe code. Using u8 arrays lets developers to just convert it with `core::str::from_utf8_unchecked` without any limitations. Example: https://github.com/vadorovsky/aya-examples/blob/main/clone/clone-ebpf/src/main.rs Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>pull/345/head
parent
6f301ac9ca
commit
a3a96b8415
Loading…
Reference in New Issue