profile_bee_aya/pin.rs
1//! Pinning BPF objects to the BPF filesystem.
2
3use thiserror::Error;
4
5use crate::sys::SyscallError;
6
7/// An error ocurred working with a pinned BPF object.
8#[derive(Error, Debug)]
9pub enum PinError {
10 /// The object FD is not known by Aya.
11 #[error("the BPF object `{name}`'s FD is not known")]
12 NoFd {
13 /// Object name.
14 name: String,
15 },
16 /// The path for the BPF object is not valid.
17 #[error("invalid pin path `{}`", path.display())]
18 InvalidPinPath {
19 /// The path.
20 path: std::path::PathBuf,
21
22 #[source]
23 /// The source error.
24 error: std::ffi::NulError,
25 },
26 /// An error ocurred making a syscall.
27 #[error(transparent)]
28 SyscallError(#[from] SyscallError),
29}