No file system I know of reports directory sizes that are multiples of
sizeof(struct dirent) except by accident. So, sync with reality. Brought to my attention by Taylor R Campbell in chat.
This commit is contained in:
parent
6b71288c49
commit
6e4e77d46e
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: stat.2,v 1.46 2010/06/04 05:42:24 jruoho Exp $
|
||||
.\" $NetBSD: stat.2,v 1.47 2010/11/25 20:53:23 dholland Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
.\"
|
||||
.\" @(#)stat.2 8.4 (Berkeley) 5/1/95
|
||||
.\"
|
||||
.Dd June 4, 2010
|
||||
.Dd November 25, 2010
|
||||
.Dt STAT 2
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -152,11 +152,12 @@ are as follows:
|
||||
.Bl -tag -width st_blksize -offset indent
|
||||
.It Va st_size
|
||||
The size of the file in bytes.
|
||||
A directory will be a multiple of the size of the
|
||||
.Xr dirent 3
|
||||
structure.
|
||||
Some file systems (notably ZFS) return the number of entries in the directory
|
||||
instead of the size in bytes.
|
||||
The meaning of the size reported for a directory is file system
|
||||
dependent.
|
||||
Some file systems (e.g. FFS) return the total size used for the
|
||||
directory metadata, possibly including free slots; others (notably
|
||||
ZFS) return the number of entries in the directory.
|
||||
Some may also return other things or always report zero.
|
||||
.It Va st_blksize
|
||||
The optimal I/O block size for the file.
|
||||
.It Va st_blocks
|
||||
|
Loading…
Reference in New Issue
Block a user