[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] df - column alignments with large filesystems
From: |
Robert Jenkins |
Subject: |
[PATCH] df - column alignments with large filesystems |
Date: |
Sat, 6 Feb 2010 15:01:04 -0000 |
Hi,
(First patch submission, apologies for any errors).
As of coreutils 8.4, df's column alignments still get messy with larger
filesystems, 1TB & up.
This patch adjusts the column spacings to maintain vertical alignment.
I've tried it with various display format options and as far as I can see it
works correctly.
Tested on a Centos 5.4 x86_64 system
Robert.
--- ./df.c 2010-01-03 17:06:20.000000000 +0000
+++ ../../coreutils-8.4t/src/df.c 2010-02-06 14:36:10.000000000 +0000
@@ -161,7 +161,7 @@
your translation has the same length as the original.
Also, each column name translation should end at the same
column as the corresponding original. */
- fputs (_(" Inodes IUsed IFree IUse%"), stdout);
+ fputs (_(" Inodes IUsed IFree IUse%"), stdout);
else if (human_output_opts & human_autoscale)
{
if (human_output_opts & human_base_1024)
@@ -170,7 +170,7 @@
fputs (_(" Size Used Avail Use%"), stdout);
}
else if (posix_format)
- printf (_(" %s-blocks Used Available Capacity"),
+ printf (_(" %s-blocks Used Available Capacity"),
umaxtostr (output_block_size, buf));
else
{
@@ -201,7 +201,7 @@
if (! (opts & human_base_1024))
opts |= human_B;
- printf (_(" %4s-blocks Used Available Use%%"),
+ printf (_(" %4s-blocks Used Available Use%%"),
human_readable (output_block_size, buf, opts, 1, 1));
}
@@ -402,7 +402,7 @@
if (inode_format)
{
- width = 7;
+ width = 8;
use_width = 5;
input_units = output_units = 1;
total = fsu.fsu_files;
@@ -421,7 +421,7 @@
width = 5 + ! (human_output_opts & human_base_1024);
else
{
- width = 9;
+ width = 10;
if (posix_format)
{
uintmax_t b;
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4841 (20100206) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
- [PATCH] df - column alignments with large filesystems,
Robert Jenkins <=