📄 statfs.3
字号:
.\" @(#)statfs.2 1.1 86/09/24 SMI; from UCB 4.2.TH statfs 3 .SH Namestatfs, \- get file system statistics.SH Syntax.nf.ft B#include <sys/types.h>#include <sys/param.h>#include <sys/mount.h>.PP.ft Bstatfs(path, buffer)char *path;struct fs_data *buffer;.PP.\" .ft B.\" fstatfs(fd, buffer).\" int fd;.\" struct statfs *buffer;.fi.\" .ft R.SH Description.NXR "string keyword".NXB "strcat subroutine".NXR "strncat subroutine".NXR "strcmp subroutine" .NXR "strncmp subroutine".NXR "strcpy subroutine".NXR "strncpy subroutine".NXR "strlen subroutine".NXR "strchr subroutine".NXR "strrchr subroutine".NXR "strpbrk subroutine".NXR "strspn subroutine".NXR "strcspn subroutine".NXR "strtok subroutine".NXR "index subroutine (standard C)".NXR "rindex subroutine (standard C)".NXB "string" "operations on null-terminated"The.PN statfslibrary routine returns up-to-date information about amounted file system.The.I pathis the path name of any file within the mounted file system.The.I bufferis a pointer to an.PN fs_datastructure as defined in.MS getmnt 2 ..\" .LP.\" Fields that are undefined for a particular file system are set to \-1..\" .PN fstatfs.\" returns the same information about an open file referenced by descriptor.\" .IR fd ..SH Return ValuesUpon successful completion, a value of.PN 1is returned.If the file system is not mounted,.PN 0is returned.Otherwise,.PN \-1is returned and the global variable.I errnois set to indicate the error..SH Diagnostics.NXR "strcat subroutine" "diagnostics"The.PN statfslibrary routine fails if one or more of the following are true:.TP 15[ENOTDIR]A component of the path prefix of.I pathis not a directory..TP 15[EINVAL].I pathcontains a character with the high-order bit set..TP 15[ENAMETOOLONG]The length of a component of.I pathexceeds 255 characters,or the length of.I pathexceeds 1023 characters..TP 15[ENOENT]The file referred to by.I pathdoes not exist..TP 15[EACCES]Search permission is denied for a component of the path prefix of.IR path ..TP 15[ELOOP]Too many symbolic links were encountered in translating.IR path ..TP 15[EFAULT].I bufferor.I pathpoints to an invalid address..TP 15[EIO]An I/O error occurred while reading from the file system..\" .LP.\" .PN fstatfs.\" fails if one or both of the following are true:.\" .TP 15.\" EBADF.\" .I fd.\" is not a valid open file descriptor..\" .TP 15.\" EFAULT.\" .I buffer.\" points to an invalid address..\" .TP 15.\" EIO.\" An I/O error occurred while reading from or writing to the file system..SH See Also.PPgetmnt(2), getmountent(3).NXE "string" "operations on null-terminated".NXE "strcat subroutine"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -