BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000524 [BusyBox] Other minor always 10-31-05 05:42 11-03-05 15:02
Reporter Dwight Engen View Status public  
Assigned To BusyBox
Priority normal Resolution no change required  
Status closed   Product Version svn
Summary 0000524: du gives wrong size
Description du assumes the stat() st_blocks field is in units of 512 instead of using st_blksize.
Additional Information The provided patch is one possible way to fix the problem.
Attached Files  du.c.diff [^] (568 bytes) 10-31-05 05:42

- Relationships

- Notes
(0000652)
landley
11-03-05 14:58

No, it doesn't. Did you actually see this bug, or try out your own patch? From the lstat man page:

   The value st_blocks gives the size of the file in 512-byte blocks.
   (This may be smaller than st_size/512 e.g. when the file has holes.)
   The value st_blksize gives the "preferred" blocksize for efficient file
   system I/O. (Writing to a file in smaller chunks may cause an ineffi-
   cient read-modify-rewrite.)

I applied your patch and tested, and it gave the wrong values. Reverting it gave the right values.
 
(0000653)
landley
11-03-05 15:02

Not a bug.
 

- Issue History
Date Modified Username Field Change
10-31-05 05:42 Dwight Engen New Issue
10-31-05 05:42 Dwight Engen Status new => assigned
10-31-05 05:42 Dwight Engen Assigned To  => BusyBox
10-31-05 05:42 Dwight Engen File Added: du.c.diff
11-03-05 14:58 landley Note Added: 0000652
11-03-05 15:02 landley Note Added: 0000653
11-03-05 15:02 landley Status assigned => closed
11-03-05 15:02 landley Resolution open => no change required


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker