summaryrefslogtreecommitdiff
path: root/src/basic/fileio.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-12-14 13:58:53 +0900
committerGitHub <noreply@github.com>2017-12-14 13:58:53 +0900
commit1bb8d1fce82527031cd635ee39e43ef532bb3b0f (patch)
tree0efbd6f8c2c5554cc208fd34e4a2895cd891d5a0 /src/basic/fileio.c
parentafbc75e686dfe108db5fda1a10e0e5670d672db5 (diff)
parent12ec9c309967d663e93254e3fca835f9a240e26f (diff)
downloadsystemd-1bb8d1fce82527031cd635ee39e43ef532bb3b0f.tar.gz
systemd-1bb8d1fce82527031cd635ee39e43ef532bb3b0f.tar.bz2
systemd-1bb8d1fce82527031cd635ee39e43ef532bb3b0f.zip
Merge pull request #7618 from tiagosh/sysctl_use_read_line
Make systemd-sysctl use read_line() and LONG_LINE_MAX
Diffstat (limited to 'src/basic/fileio.c')
-rw-r--r--src/basic/fileio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index 1ce7b85fba..3ab50bca2f 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -167,6 +167,9 @@ int write_string_file_ts(
}
}
+ if (flags & WRITE_STRING_FILE_DISABLE_BUFFER)
+ setvbuf(f, NULL, _IONBF, 0);
+
r = write_string_stream_ts(f, line, flags, ts);
if (r < 0)
goto fail;