git: 5bdb00b44fbd - stable/15 - stat.2: enhance the description of st_blocks

Konstantin Belousov <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a72d696.26580.26cae130__41349.9704490945$1785910963$gmane$org@gitrepo.freebsd.org>
The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=5bdb00b44fbdf8ac95283a0c0fd35d248b3cb0fe

commit 5bdb00b44fbdf8ac95283a0c0fd35d248b3cb0fe
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-08-02 14:57:37 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-08-05 06:12:47 +0000

    stat.2: enhance the description of st_blocks
    
    (cherry picked from commit 4c58eef12d30ec699c86d9ab8939253adbf35e79)
---
 lib/libsys/stat.2 | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/libsys/stat.2 b/lib/libsys/stat.2
index 8107740bd901..7119fa797f0a 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.