chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
sysctl: implement native sysctl tool to support Debian-style /etc/sysctl.d
[elogind.git]
/
src
/
util.c
diff --git
a/src/util.c
b/src/util.c
index 861f9eaa437ba8c5fbe7f768979473cabfc8ee82..0cd78f6561e9b03633e9b97567d0b38e6c31eb0e 100644
(file)
--- a/
src/util.c
+++ b/
src/util.c
@@
-495,6
+495,9
@@
int write_one_line_file(const char *fn, const char *line) {
goto finish;
}
+ if (!endswith(line, "\n"))
+ fputc('\n', f);
+
r = 0;
finish:
fclose(f);