X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/b0d623f7f2ae71ed96e60569f61f9a9a27016e80..0a7de7458d150b5d4dffc935ba399be265ef0a1a:/bsd/man/man2/statfs.2?ds=sidebyside diff --git a/bsd/man/man2/statfs.2 b/bsd/man/man2/statfs.2 index 16e80f5d4..8d6e6c9a6 100644 --- a/bsd/man/man2/statfs.2 +++ b/bsd/man/man2/statfs.2 @@ -49,7 +49,7 @@ .Fn statfs "const char *path" "struct statfs *buf" .Ft int .Fn fstatfs "int fd" "struct statfs *buf" -.Sh TRANSITIIONAL SYNOPSIS (NOW DEPRECATED) +.Sh TRANSITIONAL SYNOPSIS (NOW DEPRECATED) .Ft int .br .Fn statfs64 "const char *path" "struct statfs64 *buf" ; @@ -71,9 +71,11 @@ argument is a pointer to a structure. When the macro .Dv _DARWIN_FEATURE_64_BIT_INODE -is not defined (the -.Ft ino_t -type is 32-bits), that structure is defined as: +is not defined (see +.Xr stat 2 +for more information on this macro), the +.Fa statfs +structure is defined as: .Bd -literal typedef struct { int32_t val[2]; } fsid_t; @@ -94,7 +96,7 @@ struct statfs { /* when _DARWIN_FEATURE_64_BIT_INODE is NOT defined */ uid_t f_owner; /* user that mounted the file system */ short f_reserved1; /* reserved for future use */ short f_type; /* type of file system (reserved) */ - long f_flags; /* copy of mount flags (reserved) */ + long f_flags; /* copy of mount flags */ long f_reserved2[2]; /* reserved for future use */ char f_fstypename[MFSNAMELEN]; /* fs type name */ char f_mntonname[MNAMELEN]; /* directory on which mounted */ @@ -107,18 +109,8 @@ struct statfs { /* when _DARWIN_FEATURE_64_BIT_INODE is NOT defined */ However, when the macro .Dv _DARWIN_FEATURE_64_BIT_INODE is defined, the -.Ft ino_t -type will be 64-bits (force 64-bit inode mode by defining the -.Dv _DARWIN_USE_64_BIT_INODE -macro before including header files). -This will cause symbol variants of the -.Fa statfs -family, with the -.Fa $INODE64 -suffixes, to be automatically linked in. -In addition, the .Fa statfs -structure will now be defined as: +structure is defined as: .Bd -literal #define MFSTYPENAMELEN 16 /* length of fs type name including null */ #define MAXPATHLEN 1024 @@ -144,13 +136,20 @@ struct statfs { /* when _DARWIN_FEATURE_64_BIT_INODE is defined */ }; .Ed .Pp +Note that the +.Fa f_fstypename , +.Fa f_mntonname , +and +.Fa f_mntfromname +fields are also wider in this variant. +.Pp Fields that are undefined for a particular file system are set to -1. The .Fn fstatfs routine returns the same information about an open file referenced by descriptor .Fa fd . .Sh FLAGS -.Bl -tag -width MNT_UNKOWNPERMISSIONS +.Bl -tag -width MNT_UNKNOWNPERMISSIONS These are some of the flags that may be present in the f_flags field. .It Dv MNT_RDONLY A read-only filesystem @@ -188,6 +187,8 @@ File system is journaled File system should defer writes .It Dv MNT_MULTILABEL MAC support for individual labels +.It Dv MNT_CPROTECT +File system supports per-file encrypted data protection .El .Sh CAVEATS In Mac OS X versions before 10.4, f_iosize is 4096. On these older @@ -270,6 +271,9 @@ The structure used by these deprecated routines is the same as the .Fa statfs structure when 64-bit inodes are in effect (see above). +.Sh SEE ALSO +.Xr stat 2 , +.Xr getfsstat 2 .Sh HISTORY The .Fn statfs