mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zmemtopo: Fix table view spacing
Left justify partition number and partition name fields on table view to better accommodate untrimmed and longer partition names. Reviewed-by: Jan Höppner <hoeppner@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
39eb46763b
commit
29a1ef0023
@@ -540,8 +540,8 @@ static void table_print_row(char **buf, struct partition *cur,
|
||||
unsigned int i, s_padding;
|
||||
|
||||
s_padding = vdata->entry_len >= SUM_PAD ? vdata->entry_len : SUM_PAD;
|
||||
concat_w_padding(buf, LPAR_NO_LEN, 0, "%2d", cur->part_nr);
|
||||
concat_w_padding(buf, LPAR_NAME_LEN, 0, "%s", cur->part_name);
|
||||
concat_w_padding(buf, LPAR_NO_LEN, 1, "%2d", cur->part_nr);
|
||||
concat_w_padding(buf, LPAR_NAME_LEN, 1, "%s", cur->part_name);
|
||||
concat_w_padding(buf, s_padding, 0, "%lu", cur->increment_total);
|
||||
entries = &cur->entries[g.nesting_level - 1];
|
||||
for (i = 0; i < entries->count; i++) {
|
||||
@@ -579,8 +579,8 @@ static void table_print_header(char **buf, struct view_data *vdata)
|
||||
}
|
||||
util_concatf(buf, "\n");
|
||||
}
|
||||
util_concatf(buf, "%*s", LPAR_NO_LEN, "NR");
|
||||
util_concatf(buf, "%*s", LPAR_NAME_LEN, "LPAR");
|
||||
util_concatf(buf, "%-*s", LPAR_NO_LEN, "NR");
|
||||
util_concatf(buf, "%-*s", LPAR_NAME_LEN, "LPAR");
|
||||
util_concatf(buf, "%*s\n", s_padding, "SUM");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user