diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-01-05 10:35:19 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-01-05 11:45:16 +0100 |
commit | 16924f54af8876f6437ad6c87251ae92ebfba778 (patch) | |
tree | 7632a78ea58d1a834d9d7f852f70c2facf3e54fd /src/network/tc/qdisc.c | |
parent | network: split out neighbor_configure_message(), simplify logging (diff) | |
download | systemd-16924f54af8876f6437ad6c87251ae92ebfba778.tar.xz systemd-16924f54af8876f6437ad6c87251ae92ebfba778.zip |
network: move logging from tc .fill_message to the callers
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(<type>) to sizeof(var) — there is less chance of select-and-paste
error in the second form.
Diffstat (limited to 'src/network/tc/qdisc.c')
-rw-r--r-- | src/network/tc/qdisc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |