Hello, t...@!
The manual of getfsstat(2) contains the 4.3 struct statfs layout.
Index: getfsstat.2
===================================================================
RCS file: /cvs/src/lib/libc/sys/getfsstat.2,v
retrieving revision 1.17
diff -u -p -r1.17 getfsstat.2
--- getfsstat.2 5 Jun 2009 23:31:34 -0000 1.17
+++ getfsstat.2 16 Oct 2010 14:42:58 -0000
@@ -55,24 +55,34 @@ typedef struct { int32_t val[2]; } fsid_
#define MNAMELEN 90 /* length of buffer for returned name */
struct statfs {
- u_int32_t f_flags; /* copy of mount flags */
- int32_t f_bsize; /* fundamental file system block size */
- u_int32_t f_iosize; /* optimal transfer block size */
- u_int32_t f_blocks; /* total data blocks in file system */
- u_int32_t f_bfree; /* free blocks in fs */
- int32_t f_bavail; /* free blocks avail to non-superuser */
- u_int32_t f_files; /* total file nodes in file system */
- u_int32_t f_ffree; /* free file nodes in fs */
- fsid_t f_fsid; /* file system id */
- uid_t f_owner; /* user that mounted the file system */
- u_int32_t f_syncwrites; /* count of sync writes since mount */
- u_int32_t f_asyncwrites; /* count of async writes since mount */
- u_int32_t f_ctime; /* last mount [-u] time */
- u_int32_t f_spare[3]; /* spare for later */
- char f_fstypename[MFSNAMELEN]; /* fs type name */
- char f_mntonname[MNAMELEN]; /* directory on which mounted */
- char f_mntfromname[MNAMELEN]; /* mounted file system */
- union mount_info mount_info; /* per-filesystem mount options */
+ u_int32_t f_flags; /* copy of mount flags */
+ u_int32_t f_bsize; /* file system block size */
+ u_int32_t f_iosize; /* optimal transfer block size */
+
+ /* unit is f_bsize */
+ u_int64_t f_blocks; /* total data blocks in file system */
+ u_int64_t f_bfree; /* free blocks in fs */
+ int64_t f_bavail; /* free blocks avail to non-superuser */
+
+ u_int64_t f_files; /* total file nodes in file system */
+ u_int64_t f_ffree; /* free file nodes in fs */
+ int64_t f_favail; /* free file nodes avail to non-root */
+
+ u_int64_t f_syncwrites; /* count of sync writes since mount */
+ u_int64_t f_syncreads; /* count of sync reads since mount */
+ u_int64_t f_asyncwrites; /* count of async writes since mount */
+ u_int64_t f_asyncreads; /* count of async reads since mount */
+
+ fsid_t f_fsid; /* file system id */
+ u_int32_t f_namemax; /* maximum filename length */
+ uid_t f_owner; /* user that mounted the file system */
+ u_int32_t f_ctime; /* last mount [-u] time */
+ u_int32_t f_spare[3]; /* spare for later */
+
+ char f_fstypename[MFSNAMELEN]; /* fs type name */
+ char f_mntonname[MNAMELEN]; /* directory on which mounted */
+ char f_mntfromname[MNAMELEN]; /* mounted file system */
+ union mount_info mount_info; /* per-filesystem mount options */
};
.Ed
.Pp