diff options
author | Ian Dowse <iedowse@FreeBSD.org> | 2002-05-18 21:10:40 +0000 |
---|---|---|
committer | Ian Dowse <iedowse@FreeBSD.org> | 2002-05-18 21:10:40 +0000 |
commit | 85ed93337f063511bc2eb76f36f1da92d83a3d0f (patch) | |
tree | 3c4d1e7b0bb899ae2425c36f4d1f2d3b8a187f8c /bin | |
parent | 34431fe7a18553b965619c29a0378d6b1a1b2b6f (diff) | |
download | src-85ed93337f063511bc2eb76f36f1da92d83a3d0f.tar.gz src-85ed93337f063511bc2eb76f36f1da92d83a3d0f.zip |
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>
Notes
Notes:
svn path=/head/; revision=96879
Diffstat (limited to 'bin')
-rw-r--r-- | bin/df/df.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/df/df.c b/bin/df/df.c index 96767fc27df1..063963ed022d 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); |