diff options
author | Tilman Schmidt | 2015-07-09 15:22:32 +0200 |
---|---|---|
committer | Karel Zak | 2015-07-15 15:46:16 +0200 |
commit | b5225af344a8508046711f794ac2fb497db0aaa4 (patch) | |
tree | 399953419b61fc637f0eebef942acfbef469cf9b /sys-utils/ldattach.c | |
parent | libfdisk: fix fdisk_label_parse_parttype() for unknown types (diff) | |
download | kernel-qcow2-util-linux-b5225af344a8508046711f794ac2fb497db0aaa4.tar.gz kernel-qcow2-util-linux-b5225af344a8508046711f794ac2fb497db0aaa4.tar.xz kernel-qcow2-util-linux-b5225af344a8508046711f794ac2fb497db0aaa4.zip |
ldattach: adapt print_table column width to widest entry
The hardcoded column width of 10 in print_table() is not enough, as
the currently longest table entry to be printed has 12 characters.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Diffstat (limited to 'sys-utils/ldattach.c')
-rw-r--r-- | sys-utils/ldattach.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c index 33c7aa289..5317d22d8 100644 --- a/sys-utils/ldattach.c +++ b/sys-utils/ldattach.c @@ -161,8 +161,8 @@ static void print_table(FILE * out, const struct ld_table *tab) int i; for (t = tab, i = 1; t && t->name; t++, i++) { - fprintf(out, " %-10s", t->name); - if (!(i % 6)) + fprintf(out, " %-12s", t->name); + if (!(i % 5)) fputc('\n', out); } } |