From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH] swapon: align --summary fields
Date: Sun, 29 Jun 2014 19:12:13 +0100 [thread overview]
Message-ID: <1404065533-7557-1-git-send-email-kerolasa@iki.fi> (raw)
This commit makes partitions and files to have remaining three columns
aligned. Below print out demonstrates earlier misalignment.
$ swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 4194300 0 3
/home/src/util-linux/newswap file 496 0 -1
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
sys-utils/swapon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
index 8c36b2c..53cd6f9 100644
--- a/sys-utils/swapon.c
+++ b/sys-utils/swapon.c
@@ -209,7 +209,7 @@ static int display_summary(void)
printf(_("%s\t\t\t\tType\t\tSize\tUsed\tPriority\n"), _("Filename"));
while (mnt_table_next_fs(st, itr, &fs) == 0) {
- printf("%-39s\t%s\t%jd\t%jd\t%d\n",
+ printf("%-39s\t%-8s\t%jd\t%jd\t%d\n",
mnt_fs_get_source(fs),
mnt_fs_get_swaptype(fs),
mnt_fs_get_size(fs),
--
2.0.1
next reply other threads:[~2014-06-29 18:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-29 18:12 Sami Kerola [this message]
2014-06-30 8:46 ` [PATCH] swapon: align --summary fields Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404065533-7557-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox