From 85ed93337f063511bc2eb76f36f1da92d83a3d0f Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Sat, 18 May 2002 21:10:40 +0000 Subject: 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 --- bin/df/df.c | 8 +++----- 1 file 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); -- cgit v1.3