summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-11-15 14:16:31 +0000
committeryar <yar@FreeBSD.org>2004-11-15 14:16:31 +0000
commit07e57c11e75db17aa67e84d8b6d2ec03b5fb5f6c (patch)
treed2167a5e933bdcaa84b6f2a14e2faf804a73521b /lib
parent956c47074f7fae39359625ced206106d9c618819 (diff)
downloadFreeBSD-src-07e57c11e75db17aa67e84d8b6d2ec03b5fb5f6c.zip
FreeBSD-src-07e57c11e75db17aa67e84d8b6d2ec03b5fb5f6c.tar.gz
Document more fields of struct stat.
Note to mdoc(7) police: The document date has already been touched today.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/stat.232
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2
index a21d95c..cb6a767 100644
--- a/lib/libc/sys/stat.2
+++ b/lib/libc/sys/stat.2
@@ -87,6 +87,24 @@ as defined by
.In sys/stat.h
and into which information is placed concerning the file.
.Pp
+The fields of
+.Vt "struct stat"
+related to the file system are as follows:
+.Bl -tag -width ".Va st_nlink"
+.It Va st_dev
+The numeric ID of the device containing the file.
+.It Va st_ino
+The file's inode number.
+.It Va st_nlink
+The number of hard links to the file.
+.El
+.Pp
+The
+.Va st_dev
+and
+.Va st_ino
+fields together identify the file uniquely within the system.
+.Pp
The time-related fields of
.Vt "struct stat"
are as follows:
@@ -151,6 +169,8 @@ The size-related fields of the
.Vt "struct stat"
are as follows:
.Bl -tag -width ".Va st_blksize"
+.It Va st_size
+The file size in bytes.
.It Va st_blksize
The optimal I/O block size for the file.
.It Va st_blocks
@@ -159,6 +179,18 @@ As short symbolic links are stored in the inode, this number may
be zero.
.El
.Pp
+The access-related fields of
+.Vt "struct stat"
+are as follows:
+.Bl -tag -width ".Va st_mode"
+.It Va st_uid
+The user ID of the file's owner.
+.It Va st_gid
+The group ID of the file.
+.It Va st_mode
+Status of the file (see below).
+.El
+.Pp
The status information word
.Fa st_mode
has the following bits:
OpenPOWER on IntegriCloud