summaryrefslogtreecommitdiffstats
path: root/bin/df
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2004-04-22 16:26:05 +0000
committerobrien <obrien@FreeBSD.org>2004-04-22 16:26:05 +0000
commitf35f1e309da6f3f6df9b4cdb8a2e47d2f3695582 (patch)
tree516e5aa69d27b114c7a2bf8cb7d24e5bc2b6ad75 /bin/df
parentf8b184242af7edf25ea6a9f81ddca33d1f59d7fe (diff)
downloadFreeBSD-src-f35f1e309da6f3f6df9b4cdb8a2e47d2f3695582.zip
FreeBSD-src-f35f1e309da6f3f6df9b4cdb8a2e47d2f3695582.tar.gz
Fix printing of the "Mounted on" values for 'df -i'.
Fix spacing before "Mounted on" column in general. Submitted by: bde
Diffstat (limited to 'bin/df')
-rw-r--r--bin/df/df.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/df/df.c b/bin/df/df.c
index 73b9d4b..9613700 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -433,7 +433,7 @@ prtstat(struct statfs *sfsp, struct maxwidths *mwp)
if (++timesthrough == 1) {
mwp->mntfrom = imax(mwp->mntfrom, (int)strlen("Filesystem"));
if (hflag) {
- header = " Size";
+ header = " Size";
mwp->total = mwp->used = mwp->avail =
(int)strlen(header);
} else {
@@ -478,7 +478,9 @@ prtstat(struct statfs *sfsp, struct maxwidths *mwp)
(void)printf(" %*jd %*jd %4.0f%% ", mwp->iused, (intmax_t)used,
mwp->ifree, (intmax_t)sfsp->f_ffree, inodes == 0 ? 100.0 :
(double)used / (double)inodes * 100.0);
- } else if (!total)
+ } else
+ (void)printf(" ");
+ if (!total)
(void)printf(" %s", sfsp->f_mntonname);
(void)printf("\n");
}
OpenPOWER on IntegriCloud