sysctl: when debug logging about sysctl changes, truncate trailing newline

This commit is contained in:
Lennart Poettering 2018-11-21 00:07:43 +01:00
parent 883eb9be98
commit ca64ce4ad8
1 changed files with 1 additions and 1 deletions

View File

@ -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);