summaryrefslogtreecommitdiffstats
path: root/bin/df
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-05-18 21:10:40 +0000
committeriedowse <iedowse@FreeBSD.org>2002-05-18 21:10:40 +0000
commit75e563ada224bec951cc2c9e71bfa07f63977cb6 (patch)
tree3c4d1e7b0bb899ae2425c36f4d1f2d3b8a187f8c /bin/df
parenta3136f808aa1c1168e01965aec35c71a7cf92780 (diff)
downloadFreeBSD-src-75e563ada224bec951cc2c9e71bfa07f63977cb6.zip
FreeBSD-src-75e563ada224bec951cc2c9e71bfa07f63977cb6.tar.gz
Unconditionally update the maximum field width statistics when we
refetch the filesystem information in MNT_WAIT mode. This avoids incorrect column alignment that sometimes occurs with NFS filesystems. Submitted by: Ian <freebsd@damnhippie.dyndns.org>
Diffstat (limited to 'bin/df')
-rw-r--r--bin/df/df.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/df/df.c b/bin/df/df.c
index 96767fc..063963e 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -203,11 +203,9 @@ main(int argc, char *argv[])
rv = 0;
if (!*argv) {
mntsize = regetmntinfo(&mntbuf, mntsize, vfslist);
- if (vfslist != NULL) {
- bzero(&maxwidths, sizeof(maxwidths));
- for (i = 0; i < mntsize; i++)
- update_maxwidths(&maxwidths, &mntbuf[i]);
- }
+ bzero(&maxwidths, sizeof(maxwidths));
+ for (i = 0; i < mntsize; i++)
+ update_maxwidths(&maxwidths, &mntbuf[i]);
for (i = 0; i < mntsize; i++) {
if (aflag || (mntbuf[i].f_flags & MNT_IGNORE) == 0)
prtstat(&mntbuf[i], &maxwidths);
OpenPOWER on IntegriCloud