diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-08-02 14:57:37 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-08-02 22:17:28 +0000 |
| commit | 4c58eef12d30ec699c86d9ab8939253adbf35e79 (patch) | |
| tree | 5712587dacd917bac80f0bfae52e7db5a5b32c76 | |
| parent | f68d7bfc1479042184e09431bd55771c50c47f68 (diff) | |
stat.2: enhance the description of st_blocks
Reviewed by: emaste, mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D58592
| -rw-r--r-- | lib/libsys/stat.2 | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libsys/stat.2 b/lib/libsys/stat.2 index b31975ee068f..c16af32a340d 100644 --- a/lib/libsys/stat.2 +++ b/lib/libsys/stat.2 @@ -263,9 +263,19 @@ File size in bytes. .It Va st_blksize Optimal I/O block size for the file. .It Va st_blocks -Actual number of blocks allocated for the file in 512-byte units. +Actual number of blocks allocated for the file. +.Pp +For files located on non-synthetic filesystems, the block size is 512 bytes. As short symbolic links are stored in the inode, this number may be zero. +.Pp +For file descriptors referencing specific non-file objects, +the field is type-specific. +For POSIX shared memory segments +.Pq see Xr shm_open 2 , +the block size is equal to +the platform page size +.Pq Xr getpagesize 2 . .El .Pp The access-related fields of |
