From owner-freebsd-current Fri May 17 10:40:27 2002 Delivered-To: freebsd-current@freebsd.org Received: from damnhippie.dyndns.org (12-253-177-2.client.attbi.com [12.253.177.2]) by hub.freebsd.org (Postfix) with ESMTP id 0A38337B40F for ; Fri, 17 May 2002 10:40:16 -0700 (PDT) Received: from [172.22.42.2] (peace.hippie.lan [172.22.42.2]) by damnhippie.dyndns.org (8.12.3/8.12.3) with ESMTP id g4HHeE6r009813 for ; Fri, 17 May 2002 11:40:15 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) User-Agent: Microsoft Outlook Express Macintosh Edition - 5.01 (1630) Date: Fri, 17 May 2002 11:40:16 -0600 Subject: Re: df From: Ian To: freebsd-current Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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