]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: suppress message about missing libbpf if in initrd()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 Jun 2022 14:45:47 +0000 (16:45 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 3 Jun 2022 18:20:47 +0000 (03:20 +0900)
It is quite likely that libbpf is not present in the initrd, and
there isn't much reason to use the bpf filters there.

https://bugzilla.redhat.com/show_bug.cgi?id=2084955#c25

src/core/bpf-util.c

index 9130aa373f234fbeb946e132411d19e1f1606f62..84170da0a80c34ca48ddf1a54b1a598d11485489 100644 (file)
@@ -26,7 +26,8 @@ bool cgroup_bpf_supported(void) {
 
         r = dlopen_bpf();
         if (r < 0) {
-                log_info_errno(r, "Failed to open libbpf, cgroup BPF features disabled: %m");
+                log_full_errno(in_initrd() ? LOG_DEBUG : LOG_INFO,
+                               r, "Failed to open libbpf, cgroup BPF features disabled: %m");
                 return (supported = false);
         }