[patch] df.c: missing required space

Dirk Clemens develop at cle-mens.de
Thu Sep 8 01:28:06 PDT 2005


Rob Landley wrote:

>On Wednesday 07 September 2005 18:12, Dirk Clemens wrote:
>  
>
>>Dirk Clemens wrote:
>>    
>>
>>>If the filesystem name has 21 or more chars and the total space of that
>>>device is more than 100 GB then the required space between filesystem
>>>and total is not printed. The patch correct this.
>>>      
>>>
>>A new patch because I have forgotten a second space in
>>the human readable part:
>>    
>>
>
>1) Wordwrap ate it.  If the patch is inline, please switch wordwrap off on 
>your email client.
>
>2) Please patch relative to the top level directory.  (We have some confusion 
>on exactly _where_ the patch should be relative to, since the kernel standard 
>is topdir/subdirs/file.c but subversion produces just subdirs/file.c patches, 
>so whether you apply the patch with -p0 or -p1 is something you have to guess 
>at each time.  But have to cd into subdirs in order to apply the patch is not 
>normal.)
>
>Rob
>  
>
I'm still learning.
I hope this trial is ok. If not bother me. ;)


-------------- next part --------------
--- coreutils/df-orig.c	2005-09-08 10:16:10.061265216 +0200
+++ coreutils/df.c	2005-09-08 10:18:22.000000000 +0200
@@ -136,7 +136,7 @@
 			}
 
 #ifdef CONFIG_FEATURE_HUMAN_READABLE
-			bb_printf("%-21s%9s ", device,
+			bb_printf("%-20s %9s ", device,
 					  make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr));
 
 			bb_printf("%9s ",
@@ -147,7 +147,7 @@
 					  make_human_readable_str(s.f_bavail, s.f_bsize, df_disp_hr),
 					  blocks_percent_used, mount_point);
 #else
-			bb_printf("%-21s%9ld %9ld %9ld %3ld%% %s\n",
+			bb_printf("%-20s %9ld %9ld %9ld %3ld%% %s\n",
 					  device,
 					  kscale(s.f_blocks, s.f_bsize),
 					  kscale(s.f_blocks-s.f_bfree, s.f_bsize),


More information about the busybox mailing list