Date: Fri, 17 May 2002 11:40:16 -0600 From: Ian <freebsd@damnhippie.dyndns.org> To: freebsd-current <freebsd-current@freebsd.org> Subject: Re: df Message-ID: <B90A9CA0.D159%freebsd@damnhippie.dyndns.org> In-Reply-To: <XFMail.20020517182701.riccardo@torrini.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05/17/02 10:27, Riccardo Torrini wrote: > I manually mount nfs fs after a reboot (current -> stable) and > if I do a "df" I got two different output. First time it get > garbled, all other times it is aligned. I'm alone? > I looked at the df code because I was intensely curious how this could happen. It obtains the list of mounts using a NOWAIT flag, and NFS mount info may not be available immediately so it doesn't get included in the field width calculations. Then later it re-gets the list of mounts using a WAIT flag (unless you used -n on the command line) so this time it has the info from NFS filesystems, but it doesn't recalculate the field widths. The following patch should fix it without breaking other behaviors, I belive. -- Ian --- df.c.orig Fri May 17 11:30:55 2002 +++ df.c Fri May 17 11:31:39 2002 @@ -203,7 +203,7 @@ rv = 0; if (!*argv) { mntsize = regetmntinfo(&mntbuf, mntsize, vfslist); - if (vfslist != NULL) { + if (!nflag) { bzero(&maxwidths, sizeof(maxwidths)); for (i = 0; i < mntsize; i++) update_maxwidths(&maxwidths, &mntbuf[i]); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B90A9CA0.D159%freebsd>