mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
hyptop/table: Fill system name column for CSV output
When machine parseable format is specified via hyptop --format csv the summary row for csv does not have any indicator or and a blank system name. Avoid this confusion by adding "SUM" as system name. Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Mete Durlu <meted@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
617a8248e8
commit
fe78faa8ae
@@ -988,8 +988,11 @@ static void l_row_print_formatted(struct table *t, struct table_row *row)
|
||||
unsigned int flags = 0;
|
||||
struct table_entry *e = &row->entries[col_nr];
|
||||
|
||||
if (row == t->row_last && col_nr == 0)
|
||||
if (row == t->row_last && col_nr == 0) {
|
||||
if (g.o.format == FMT_CSV)
|
||||
util_fmt_pair(FMT_QUOTE, col->head, "SUM", e->str);
|
||||
continue;
|
||||
}
|
||||
if (table_col_needs_quotes(col))
|
||||
flags = FMT_QUOTE;
|
||||
if (strcmp(e->str, "-") == 0 || strcmp(e->str, "") == 0)
|
||||
|
||||
Reference in New Issue
Block a user