Subject: Re: Problem with df(1)
To: Gunnar Helliesen <gunnar@bitcon.no>
From: Ask Dr. Stupid <greywolf@starwolf.starwolf.com>
List: port-i386
Date: 11/04/1997 19:26:22
Do we need to use a %qd instead of a %ld?  [does such an animal exist...?]
How about %lu?

Gunnar Helliesen sez:
/*
 * Some of you might remember that I reported a problem with df(1) a while
 * back. The problem is that the free space calculations are wrong on large
 * disks:
 * 
 * atlas:~# df /dev/sd2c
 * Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
 * /dev/sd2c    21952751 20433937 -41430858   -97%    /usr/local/ftp/.4
 * 
[ ... ]
 *         (void)printf(" %*ld %8ld %8ld", headerlen,
 *             fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize),
 *             fsbtoblk(used, sfsp->f_bsize, blocksize),
 *             fsbtoblk(sfsp->f_bavail, sfsp->f_bsize, blocksize));
 *         (void)printf(" %5.0f%%",
 *             availblks == 0 ? 100.0 : (double)used / (double)availblks *
 * 100.0);
 */





				--*greywolf;
--
		    WANTED FOR DESTRUCTION OF THE UNIX WORLD:
	     Scott McNealy of Sun for adopting SVR4 ("Selling Out")
	   Roel Piper, formerly of USL, for suing BSDi and UC Berkeley
		       ("Biting the hand that feeds you")
  Bill Gates for purposeful ignorance of existing standards ("Your Way Sucks")
	     >>> REWARD:  A useful OS complete with source code. <<<
			*** DISINTEGRATIONS PERMITTED ***