From: Karel Zak Date: Tue, 20 Mar 2012 10:04:48 +0000 (+0100) Subject: misc: clenaup SIZE columns in lsblk and findmnt X-Git-Tag: v2.22-rc1~637 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=451d76463c6afd732ae488ec23d68d7ec22d0bee;p=thirdparty%2Futil-linux.git misc: clenaup SIZE columns in lsblk and findmnt Note that lib/tt.c will never truncate columns without TT_FL_TRUNC or relative column width. So it's fine to set small width for columns with SIZEs, the defined width is minimal width. Signed-off-by: Karel Zak --- diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index 9ac7c460c8..476263c27c 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -107,10 +107,10 @@ static struct colinfo infos[FINDMNT_NCOLUMNS] = { [COL_ACTION] = { "ACTION", 10, TT_FL_STRICTWIDTH, N_("action detected by --poll") }, [COL_OLD_OPTIONS] = { "OLD-OPTIONS", 0.10, TT_FL_TRUNC, N_("old mount options saved by --poll") }, [COL_OLD_TARGET] = { "OLD-TARGET", 0.30, 0, N_("old mountpoint saved by --poll") }, - [COL_SIZE] = { "SIZE", 8, TT_FL_RIGHT, N_("filesystem size") }, - [COL_AVAIL] = { "AVAIL", 8, TT_FL_RIGHT, N_("filesystem size available") }, - [COL_USED] = { "USED", 8, TT_FL_RIGHT, N_("filesystem size used") }, - [COL_USEPERC] = { "USE%", 8, TT_FL_RIGHT, N_("filesystem use percentage") }, + [COL_SIZE] = { "SIZE", 5, TT_FL_RIGHT, N_("filesystem size") }, + [COL_AVAIL] = { "AVAIL", 5, TT_FL_RIGHT, N_("filesystem size available") }, + [COL_USED] = { "USED", 5, TT_FL_RIGHT, N_("filesystem size used") }, + [COL_USEPERC] = { "USE%", 3, TT_FL_RIGHT, N_("filesystem use percentage") }, }; /* global flags */ diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 9c0be27493..4ff0102db6 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -112,7 +112,7 @@ static struct colinfo infos[] = { [COL_RM] = { "RM", 1, TT_FL_RIGHT, N_("removable device") }, [COL_ROTA] = { "ROTA", 1, TT_FL_RIGHT, N_("rotational device") }, [COL_MODEL] = { "MODEL", 0.1, TT_FL_TRUNC, N_("device identifier") }, - [COL_SIZE] = { "SIZE", 6, TT_FL_RIGHT, N_("size of the device") }, + [COL_SIZE] = { "SIZE", 5, TT_FL_RIGHT, N_("size of the device") }, [COL_STATE] = { "STATE", 7, TT_FL_TRUNC, N_("state of the device") }, [COL_OWNER] = { "OWNER", 0.1, TT_FL_TRUNC, N_("user name"), }, [COL_GROUP] = { "GROUP", 0.1, TT_FL_TRUNC, N_("group name") },