Bug 23008

Summary: df -k reports incorrect amount of disk taken when BLOCKSIZE=K
Product: Base System Reporter: zaks <zaks>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description zaks 2000-11-21 18:00:00 UTC
	du with option -k and $BLOCKSIZE set to K reports half the amount of disk taken.

Fix: 

Correct the -k option handling.
How-To-Repeat: 
	$ unset BLOCKSIZE; du -sk /etc
	$ BLOCKSIZE=K du -sk /etc
Comment 1 dhagan 2001-01-03 20:43:10 UTC
I built du from -CURRENT and couldn't reproduce your problem:

> ./du -sk /etc
du: /etc/isdn: Permission denied
du: /etc/uucp: Permission denied
688     /etc
> env BLOCKSIZE=K ./du -sk /etc
du: /etc/isdn: Permission denied
du: /etc/uucp: Permission denied
688     /etc
> ./du -s /etc
du: /etc/isdn: Permission denied
du: /etc/uucp: Permission denied
1376    /etc

Can you provide more details, or should this be closed?

Daniel
Comment 2 bkogawa 2001-01-26 10:54:21 UTC
I tried this out on 4.1-RELEASE, and I didn't see it either:

{baz} ~ 2:46 ttyp9 > uname -a
FreeBSD baz.fake.primenet.com 4.1-RELEASE FreeBSD 4.1-RELEASE #0: Sat Oct
7 22:49:51 PDT 2000
bkogawa@baz.fake.primenet.com:/usr/src/sys/compile/BAZAWE  i386
{baz} ~ 2:46 ttyp9 > du -sk /etc
du: /etc/isdn: Permission denied
1488    /etc
{baz} ~ 2:53 ttyp9 > du -s /etc
du: /etc/isdn: Permission denied
2976    /etc
{baz} ~ 2:53 ttyp9 > echo $BLOCKSIZE
BLOCKSIZE: Undefined variable.
{baz} ~ 2:53 ttyp9 > setenv BLOCKSIZE K
{baz} ~ 2:53 ttyp9 > du -s /etc
du: /etc/isdn: Permission denied
1488    /etc
{baz} ~ 2:53 ttyp9 > setenv BLOCKSIZE k
{baz} ~ 2:53 ttyp9 > du -s /etc
du: /etc/isdn: Permission denied
1488    /etc


-- 
bryan k ogawa  <bkogawa@primenet.com>   http://www.primenet.com/~bkogawa/
Comment 3 dd freebsd_committer freebsd_triage 2001-06-19 01:54:34 UTC
State Changed
From-To: open->closed

Problem not reproducable by myself and two other people in the audit-trail.