From 16924f54af8876f6437ad6c87251ae92ebfba778 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 5 Jan 2022 10:35:19 +0100 Subject: network: move logging from tc .fill_message to the callers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Structured initialization is used a bit more. There were two kinds of log messages: about failed size calculations and about failed appends to the message. I "downgraded" the first type to log_debug, and moved the latter to the caller. This way there should be at most one high-priority message. I also changed sizeof() to sizeof(var) — there is less chance of select-and-paste error in the second form. --- src/network/tc/qdisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/network/tc/qdisc.c') diff --git a/src/network/tc/qdisc.c b/src/network/tc/qdisc.c index 2e0f0a12eb..32b55e99f8 100644 --- a/src/network/tc/qdisc.c +++ b/src/network/tc/qdisc.c @@ -210,7 +210,7 @@ int qdisc_configure(Link *link, QDisc *qdisc) { if (QDISC_VTABLE(qdisc)->fill_message) { r = QDISC_VTABLE(qdisc)->fill_message(link, qdisc, req); if (r < 0) - return r; + return log_link_error_errno(link, r, "Could not fill netlink message: %m"); } } else { r = sd_netlink_message_append_string(req, TCA_KIND, qdisc->tca_kind); -- cgit v1.2.3