]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
findmnt: add missing newline in --raw, --pair and --list output formats
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Sat, 30 Aug 2025 02:41:04 +0000 (22:41 -0400)
committerKarel Zak <kzak@redhat.com>
Tue, 9 Sep 2025 10:18:11 +0000 (12:18 +0200)
Addresses: #3711
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit 5dfb06873eb07389cc2aa9276adb7791bb5f40ab)

misc-utils/findmnt.c

index 08903000f7b9cf0a1d8a18550b0dcd8d02b2f31e..4807eaf08e7c74a02673c3c3ec05226a9c2cde4a 100644 (file)
@@ -1446,6 +1446,8 @@ static int poll_table(struct libmnt_table *tb, const char *tabfile,
 
                if (count) {
                        rc = scols_table_print_range(table, NULL, NULL);
+                       if (rc == 0 && !(findmnt->flags & FL_JSON))
+                               fputc('\n', scols_table_get_stream(table));
                        fflush(scols_table_get_stream(table));
                        if (rc)
                                goto done;