From 648ba0ee8178105777502cfcd869d7c04511db96 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 13 Apr 2020 11:26:15 +0200 Subject: [PATCH] hwdb: optimize isatty()-per-line away Fixes: #15407 --- src/libsystemd/sd-hwdb/hwdb-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c index d790e8fd0b1..5c7521695ec 100644 --- a/src/libsystemd/sd-hwdb/hwdb-util.c +++ b/src/libsystemd/sd-hwdb/hwdb-util.c @@ -488,7 +488,7 @@ static int import_file(struct trie *trie, const char *filename, uint16_t file_pr size_t len; char *pos; - r = read_line(f, LONG_LINE_MAX, &line); + r = read_line_full(f, LONG_LINE_MAX, READ_LINE_NOT_A_TTY, &line); if (r < 0) return r; if (r == 0) -- 2.47.3