[patch] df.c: missing required space

Dirk Clemens develop at cle-mens.de
Wed Sep 7 23:12:27 UTC 2005


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:

diff -u df-orig.c df.c
--- df-orig.c   2005-09-08 00:42:37.697972776 +0200
+++ df.c        2005-09-08 00:56:20.000000000 +0200
@@ -136,7 +136,7 @@
                        }

 #ifdef CONFIG_FEATURE_HUMAN_READABLE
-                       bb_printf("%-21s%9s ", device,
+                       bb_printf("%-21s %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("%-21s %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