summaryrefslogtreecommitdiff
path: root/src/basic/fileio.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-09-22 20:55:34 +0200
committerLennart Poettering <lennart@poettering.net>2017-09-22 20:55:34 +0200
commitb18371338345cfbcc1831dea742300d0889b4428 (patch)
treebe427bfb97bd8324faea04e0a8c6983e554e12e5 /src/basic/fileio.h
parent2eabcc772b7505b201952cbece332b22dad29647 (diff)
downloadsystemd-b18371338345cfbcc1831dea742300d0889b4428.tar.gz
systemd-b18371338345cfbcc1831dea742300d0889b4428.tar.bz2
systemd-b18371338345cfbcc1831dea742300d0889b4428.zip
fileio: make write_string_stream() accept flags parameter
Let's make write_string_stream() and write_string_file() more alike, and pass the same flag set so that we can remove a number of boolean parameters.
Diffstat (limited to 'src/basic/fileio.h')
-rw-r--r--src/basic/fileio.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/fileio.h b/src/basic/fileio.h
index b4238746d6..c4a42eb8e9 100644
--- a/src/basic/fileio.h
+++ b/src/basic/fileio.h
@@ -36,9 +36,9 @@ typedef enum {
WRITE_STRING_FILE_SYNC = 1<<4,
} WriteStringFileFlags;
-int write_string_stream_ts(FILE *f, const char *line, bool enforce_newline, struct timespec *ts);
-static inline int write_string_stream(FILE *f, const char *line, bool enforce_newline) {
- return write_string_stream_ts(f, line, enforce_newline, NULL);
+int write_string_stream_ts(FILE *f, const char *line, WriteStringFileFlags flags, struct timespec *ts);
+static inline int write_string_stream(FILE *f, const char *line, WriteStringFileFlags flags) {
+ return write_string_stream_ts(f, line, flags, NULL);
}
int write_string_file_ts(const char *fn, const char *line, WriteStringFileFlags flags, struct timespec *ts);
static inline int write_string_file(const char *fn, const char *line, WriteStringFileFlags flags) {