From: Christian Hesse Date: Fri, 1 Aug 2025 14:56:25 +0000 (+0200) Subject: bpf-dlopen: degrade log_level to LOG_DEBUG in initrd X-Git-Tag: v258-rc2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d05a077f1620c980d27b50fff3c3f6577bc07eb1;p=thirdparty%2Fsystemd.git bpf-dlopen: degrade log_level to LOG_DEBUG in initrd That's what it used to behave before 4d2b9abbe11131d25aea4966a9c25a06703c6183. --- diff --git a/src/shared/bpf-dlopen.c b/src/shared/bpf-dlopen.c index 5f5402609bf..e84b435f488 100644 --- a/src/shared/bpf-dlopen.c +++ b/src/shared/bpf-dlopen.c @@ -2,6 +2,7 @@ #include "bpf-dlopen.h" #include "dlfcn-util.h" +#include "initrd-util.h" #include "log.h" #if HAVE_LIBBPF @@ -92,7 +93,7 @@ int dlopen_bpf_full(int log_level) { * list for both files, and when we assume 1.0+ is present we can remove this dlopen */ dl = dlopen("libbpf.so.0", RTLD_NOW|RTLD_NODELETE); if (!dl) - return cached = log_full_errno(log_level, SYNTHETIC_ERRNO(EOPNOTSUPP), + return cached = log_full_errno(in_initrd() ? LOG_DEBUG : log_level, SYNTHETIC_ERRNO(EOPNOTSUPP), "Neither libbpf.so.1 nor libbpf.so.0 are installed, cgroup BPF features disabled: %s", dlerror());