aya-bpf-bindings: remove unused code

pull/1/head
Alessandro Decina 4 years ago
parent 59ed237343
commit 713494609e

@ -1,21 +1,3 @@
pub mod bindings; pub mod bindings;
pub mod getters; pub mod getters;
pub mod helpers; pub mod helpers;
use aya_bpf_cty::{c_long, c_void};
use core::mem::{self, MaybeUninit};
#[inline]
unsafe fn bpf_probe_read<T>(src: *const T) -> Result<T, c_long> {
let mut v: MaybeUninit<T> = MaybeUninit::uninit();
let ret = helpers::bpf_probe_read(
v.as_mut_ptr() as *mut c_void,
mem::size_of::<T>() as u32,
src as *const c_void,
);
if ret < 0 {
return Err(ret);
}
Ok(v.assume_init())
}

Loading…
Cancel
Save