[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
df format
From: |
Mike Black |
Subject: |
df format |
Date: |
Mon, 20 May 2002 07:52:58 -0400 |
I think I submitted this once before but here it is again against 4.1.8 --
both as an attachment and in-line.
This is a simple patch for terabtye file systems to pretty up the output.
When filesystem size goes to terabyte the output gets jagged.
*** df.c.orig Wed Dec 19 04:44:12 2001
--- df.c Mon May 20 07:50:05 2002
***************
*** 164,170 ****
printf (_(" Size Used Avail Use%%"));
}
else if (posix_format)
! printf (_(" %4d-blocks Used Available Capacity"),
output_block_size);
else
{
char buf[LONGEST_HUMAN_READABLE + 1];
--- 164,170 ----
printf (_(" Size Used Avail Use%%"));
}
else if (posix_format)
! printf (_(" %4d-blocks Used Available Capacity"),
output_block_size);
else
{
char buf[LONGEST_HUMAN_READABLE + 1];
***************
*** 175,181 ****
if (3 <= plen && strncmp (p + plen - 3, ".0", 2) == 0)
strcpy (p + plen - 3, p + plen - 1);
! printf (_(" %4s-blocks Used Available Use%%"), p);
}
printf (_(" Mounted on\n"));
--- 175,181 ----
if (3 <= plen && strncmp (p + plen - 3, ".0", 2) == 0)
strcpy (p + plen - 3, p + plen - 1);
! printf (_(" %4s-blocks Used Available Use%%"), p);
}
printf (_(" Mounted on\n"));
***************
*** 326,332 ****
}
else
{
! width = output_block_size < 0 ? 5 + (output_block_size == -1000) :
9;
use_width = posix_format ? 8 : 4;
input_units = fsu.fsu_blocksize;
output_units = output_block_size;
--- 326,332 ----
}
else
{
! width = output_block_size < 0 ? 5 + (output_block_size == -1000) :
10;
use_width = posix_format ? 8 : 4;
input_units = fsu.fsu_blocksize;
output_units = output_block_size;
Michael D. Black address@hidden
http://www.csihq.com/
http://www.csihq.com/~mike
321-676-2923, x203
Melbourne FL
patch.txt
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |