findmnt: use scols_table_print_range() for --poll

This change fixes problem with duplicate header line.

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2016-02-24 12:04:24 +01:00
parent 7db029e54a
commit c1d185c77b
1 changed files with 2 additions and 1 deletions

View File

@ -1165,7 +1165,7 @@ static int poll_table(struct libmnt_table *tb, const char *tabfile,
}
if (count) {
rc = scols_print_table(table);
rc = scols_table_print_range(table, NULL, NULL);
if (rc)
goto done;
}
@ -1175,6 +1175,7 @@ static int poll_table(struct libmnt_table *tb, const char *tabfile,
tb = tb_new;
tb_new = tmp;
/* remove allredy printed lines to reduce memory usage */
scols_table_remove_lines(table);
mnt_reset_table(tb_new);