From ab119e633878ead1d6919d5ab366ad907f6dde02 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 5 Feb 2020 21:09:03 +0900 Subject: [PATCH] network: append period if error message provided by kernel does not contain it --- src/network/networkd-link.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 7f37a8648b..c86cba8f8b 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -4305,5 +4305,10 @@ int log_link_message_full_errno(Link *link, sd_netlink_message *m, int level, in const char *err_msg = NULL; (void) sd_netlink_message_read_string(m, NLMSGERR_ATTR_MSG, &err_msg); - return log_link_full(link, level, err, "%s: %s%s%m", msg, strempty(err_msg), err_msg ? " " : ""); + return log_link_full(link, level, err, + "%s: %s%s%s%m", + msg, + strempty(err_msg), + err_msg && !endswith(err_msg, ".") ? "." : "", + err_msg ? " " : ""); }