From: Karel Zak Date: Mon, 22 Feb 2016 09:43:25 +0000 (+0100) Subject: libsmartcols: fix scols_table_print_range() to print header X-Git-Tag: v2.28-rc1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=334e5eba9ee01357ca8275708711881fd9fbc99b;p=thirdparty%2Futil-linux.git libsmartcols: fix scols_table_print_range() to print header References: https://github.com/karelzak/util-linux/issues/287 Signed-off-by: Karel Zak --- diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c index f65cce3832..d6622be64e 100644 --- a/libsmartcols/src/table_print.c +++ b/libsmartcols/src/table_print.c @@ -1339,7 +1339,7 @@ int scols_table_print_range( struct libscols_table *tb, } else scols_reset_iter(&itr, SCOLS_ITER_FORWARD); - if (itr.p == tb->tb_lines.next) { + if (!start || itr.p == tb->tb_lines.next) { rc = print_header(tb, buf); if (rc) goto done;