From owner-freebsd-current Sat May 18 16:55:31 2002 Delivered-To: freebsd-current@freebsd.org Received: from gull.prod.itd.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by hub.freebsd.org (Postfix) with ESMTP id B61C037B401 for ; Sat, 18 May 2002 16:55:26 -0700 (PDT) Received: from pool0271.cvx22-bradley.dialup.earthlink.net ([209.179.199.16] helo=mindspring.com) by gull.prod.itd.earthlink.net with esmtp (Exim 3.33 #2) id 179E2j-0006Xf-00; Sat, 18 May 2002 16:55:21 -0700 Message-ID: <3CE6E9CB.597E0BC@mindspring.com> Date: Sat, 18 May 2002 16:54:51 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Ian Dowse Cc: Ian , freebsd-current Subject: Re: df References: <200205190041.aa04845@salmon.maths.tcd.ie> 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 Ian Dowse wrote: > In message <3CE6DFED.8604C72C@mindspring.com>, Terry Lambert writes: > >I think the reason for the "if" is to keep the df from hanging > >indefinitely, particularly when you give it an explicit list. > > No, I believe the "if (vfslist != NULL)" code was there to reduce > the maximum column widths to those necessary for an explicit list > of filesystems rather than using the maximum widths for all > filesystems. The regetmntinfo() call before the "if" has already > performed any operations that could hang indefinitely, so it makes > sense to unconditionally use these up-to-date results instead of > the potentially stale list from getmntinfo(..., MNT_NOWAIT). Like "ps", "df" is a snapshot. As such, "staleness" after a few tenths of a second is really irrelevent, since the information is never really "the real and precise information". It's more important to be able to get information in a misbehaving system, without hanging your shell forever. 8-(. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message