On Tue, Feb 08, 2005 at 11:22:24AM -0500, Michael Stone wrote:
> On Tue, Feb 08, 2005 at 03:39:05PM +0000, James Youngman wrote:
> >No.    The POSIX standard (in a non-normative section) says :-
> >
> >| The unit for the st_blocks member of the stat structure is not defined
> >| within IEEE Std 1003.1-2001. In some implementations it is 512
> >| bytes. It may differ on a file system basis. There is no correlation
> >| between values of the st_blocks and st_blksize, and the f_bsize (from
> >| <sys/statvfs.h>) structure members.
> >| 
> >| Traditionally, some implementations defined the multiplier for
> >| st_blocks in <sys/param.h> as the symbol DEV_BSIZE.
> >
> >I think almost all systems use 512 byte units.
> 
> Note where it says "some implementations"? You're diving heavily into
> implementation-specific logic, and making unfounded assumptions. 

I wasn't.  I have never assumed that st_blksize should ever be
multiplied by st_blocks.  That's why I was quoting the POSIX document.

Besides though, I think the original comment related to "df" not "du".

However, It is probably useful for the documentation to indicate
explicitly what units each of the file-size or disk-capacity
%-format-directives is measured in, except where this is not known
until "configure" is run (making config.status generat foo.texi seems
prety awkward to me).

James.




_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to