fileio: optionally allow telling read_line_full() whether we are processing a tty or not

This commit is contained in:
Lennart Poettering
2020-04-13 11:27:07 +02:00
parent 14f594b995
commit 609ae0f596
2 changed files with 8 additions and 6 deletions
+3 -1
View File
@@ -88,7 +88,9 @@ int read_timestamp_file(const char *fn, usec_t *ret);
int fputs_with_space(FILE *f, const char *s, const char *separator, bool *space);
typedef enum ReadLineFlags {
READ_LINE_ONLY_NUL = 1 << 0,
READ_LINE_ONLY_NUL = 1 << 0,
READ_LINE_IS_A_TTY = 1 << 1,
READ_LINE_NOT_A_TTY = 1 << 2,
} ReadLineFlags;
int read_line_full(FILE *f, size_t limit, ReadLineFlags flags, char **ret);