From owner-freebsd-current@FreeBSD.ORG Mon Apr 14 03:33:40 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91ECE37B401 for ; Mon, 14 Apr 2003 03:33:40 -0700 (PDT) Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07F6343F85 for ; Mon, 14 Apr 2003 03:33:40 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (210.50.85.56) by smtp02.syd.iprimus.net.au (7.0.012) id 3E8A1600002B2EE4; Mon, 14 Apr 2003 20:33:38 +1000 Received: by dilbert.robbins.dropbear.id.au (Postfix, from userid 1000) id C0DD6C90D; Mon, 14 Apr 2003 20:32:57 +1000 (EST) Date: Mon, 14 Apr 2003 20:32:57 +1000 From: Tim Robbins To: Christoph Kukulies Message-ID: <20030414203257.A75820@dilbert.robbins.dropbear.id.au> References: <200304141005.h3EA5GM01835@accms33.physik.rwth-aachen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200304141005.h3EA5GM01835@accms33.physik.rwth-aachen.de>; from kuku@physik.rwth-aachen.de on Mon, Apr 14, 2003 at 12:05:16PM +0200 cc: freebsd-current@freebsd.org Subject: Re: df displays 0. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 10:33:40 -0000 On Mon, Apr 14, 2003 at 12:05:16PM +0200, Christoph Kukulies wrote: > > Is this normal?: > > www# df > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/ad0s1a 257838 72384 164828 31% / > devfs 1 1 0 100% /dev > /dev/ad0s1e 257838 22 237190 0.% /tmp > /dev/ad0s1f 57829724 12064820 41138528 23% /usr > /dev/ad0s1d 257838 8686 228526 4% /var > > I mean, the 0. percent on /tmp . This is probably another problem with vfprintf()'s new floating point code. I'm seeing the same problem here now that I've rebuilt /bin/df with a recent libc. Here's a test program that demonstrates the problem. It's worth pointing out that 0.0 is printed correctly as "0%", but 0+eps is printed as "0.%". #include #include #include int main(int argc, char *argv[]) { printf("%5.0f%%\n", 0.0); printf("%5.0f%%\n", DBL_EPSILON); exit(0); }