summaryrefslogtreecommitdiff
path: root/src/sleep
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-07-06 17:31:44 -0400
committerDaniel Mack <daniel@zonque.org>2015-07-06 17:31:44 -0400
commit40beecdb6d1c73e5acb62ebac2ccbfd7891f2418 (patch)
tree40626ff5f761e898e7343939878a10d87e9d29a8 /src/sleep
parenteff8efe671e9ffa81e80ad13f791a32262567dfe (diff)
fileio: add 'enforce_newline' argument to write_string_stream()
Add a flag to control whether write_string_stream() should always enforce a trailing newline character in the file.
Diffstat (limited to 'src/sleep')
-rw-r--r--src/sleep/sleep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index eee6bc8982..2be63b40c6 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -65,7 +65,7 @@ static int write_state(FILE **f, char **states) {
STRV_FOREACH(state, states) {
int k;
- k = write_string_stream(*f, *state);
+ k = write_string_stream(*f, *state, true);
if (k == 0)
return 0;
log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m",