From 9f09dc41f91a2be861322dce443beb70ce585a79 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 26 Mar 2025 11:38:47 +1100 Subject: [PATCH] Update panic message --- ebpf/aya-ebpf/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebpf/aya-ebpf/src/lib.rs b/ebpf/aya-ebpf/src/lib.rs index 3a84a325..dee8c735 100644 --- a/ebpf/aya-ebpf/src/lib.rs +++ b/ebpf/aya-ebpf/src/lib.rs @@ -144,7 +144,7 @@ macro_rules! prelude { #[cfg(not(target_arch = "bpf"))] fn main() { - panic!("This should only ever be called from its eBPF entrypoint") + panic!(r#"eBPF kernels are not designed to be executed in user-space. This main function is only a placeholder to allow the code to compile on the host system (i.e. on any system that is not `target_arch = "bpf"`). This works in tandem with the `no_main` attribute which is only applied when compiling for `target_arch = "bpf"`."#) } }; }