From: Lennart Poettering Date: Tue, 20 Nov 2018 23:07:43 +0000 (+0100) Subject: sysctl: when debug logging about sysctl changes, truncate trailing newline X-Git-Tag: v240~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca64ce4ad8837131b5c227299a3ee5bf45c94530;p=thirdparty%2Fsystemd.git sysctl: when debug logging about sysctl changes, truncate trailing newline --- diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c index 326652273ce..480e6c38a11 100644 --- a/src/shared/sysctl-util.c +++ b/src/shared/sysctl-util.c @@ -44,7 +44,7 @@ int sysctl_write(const char *property, const char *value) { assert(property); assert(value); - log_debug("Setting '%s' to '%s'", property, value); + log_debug("Setting '%s' to '%.*s'.", property, (int) strcspn(value, NEWLINE), value); p = strjoina("/proc/sys/", property); fd = open(p, O_WRONLY|O_CLOEXEC);