From: Yu Watanabe Date: Mon, 14 Dec 2020 16:13:32 +0000 (+0900) Subject: core: detect_container() may return negative errno X-Git-Tag: v248-rc1~516 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bcdb3b7d5076cf6ad17cb70df8db22d876880ada;p=thirdparty%2Fsystemd.git core: detect_container() may return negative errno --- diff --git a/src/core/bpf-firewall.c b/src/core/bpf-firewall.c index 44aa1bfb1e5..5952eaf2f73 100644 --- a/src/core/bpf-firewall.c +++ b/src/core/bpf-firewall.c @@ -893,7 +893,7 @@ void emit_bpf_firewall_warning(Unit *u) { static bool warned = false; if (!warned) { - bool quiet = bpf_firewall_unsupported_reason == -EPERM && detect_container(); + bool quiet = bpf_firewall_unsupported_reason == -EPERM && detect_container() > 0; log_unit_full_errno(u, quiet ? LOG_DEBUG : LOG_WARNING, bpf_firewall_unsupported_reason, "unit configures an IP firewall, but %s.\n"