181 lines
6.2 KiB
Groff
181 lines
6.2 KiB
Groff
.\" Copyright (c) 1989, 1991, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)statfs.2 8.5 (Berkeley) 5/24/95
|
|
.\" %FreeBSD: src/lib/libc/sys/statfs.2,v 1.21 2002/12/19 09:40:25 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd May 24, 1995
|
|
.Dt STATFS 2
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm statfs
|
|
.Nd ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÅý·×¤òÆþ¼ê
|
|
.Sh ¥é¥¤¥Ö¥é¥ê
|
|
.Lb libc
|
|
.Sh ½ñ¼°
|
|
.In sys/param.h
|
|
.In sys/mount.h
|
|
.Ft int
|
|
.Fn statfs "const char *path" "struct statfs *buf"
|
|
.Ft int
|
|
.Fn fstatfs "int fd" "struct statfs *buf"
|
|
.Sh ²òÀâ
|
|
.Fn statfs
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¾ðÊó¤òÌᤷ¤Þ¤¹¡£
|
|
.Fa path
|
|
°ú¿ô¤Ï¡¢¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥àÆâ¤ÎǤ°Õ¤Î¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹Ì¾¤Ç¤¹¡£
|
|
.Fa buf
|
|
°ú¿ô¤Ï¡¢°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë
|
|
.Vt statfs
|
|
¤Î¹½Â¤ÂΤΥݥ¤¥ó¥¿¤Ç¤¹:
|
|
.Bd -literal
|
|
typedef struct fsid { int32_t val[2]; } fsid_t; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à ID ·¿ */
|
|
|
|
/*
|
|
* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥àÅý·×
|
|
*/
|
|
|
|
#define MFSNAMELEN 16 /* ¥Ì¥ë¤ò´Þ¤à¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à̾¤ÎŤµ */
|
|
#define MNAMELEN 90 /* Ìá¤êÃͤÎÍѤΥХåե¡¤ÎŤµ */
|
|
|
|
struct statfs {
|
|
long f_bsize; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥Ö¥í¥Ã¥¯¥µ¥¤¥º */
|
|
long f_iosize; /* ºÇŬ¤ÊžÁ÷¥Ö¥í¥Ã¥¯¥µ¥¤¥º */
|
|
long f_blocks; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Î¹ç·×¥Ö¥í¥Ã¥¯¥µ¥¤¥º */
|
|
long f_bfree; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤ÎÍøÍѲÄǽ¤Ê¥Ö¥í¥Ã¥¯ */
|
|
long f_bavail; /* ¥¹¡¼¥Ñ¥æ¡¼¥¶°Ê³°¤¬ÍøÍѲÄǽ¤Ê¥Ö¥í¥Ã¥¯ */
|
|
long f_files; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Î¹ç·×¥Î¡¼¥É¿ô */
|
|
long f_ffree; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤ÎÍøÍѲÄǽ¤Ê¥Î¡¼¥É¿ô */
|
|
fsid_t f_fsid; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à ID ÈÖ¹æ */
|
|
uid_t f_owner; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¥Þ¥¦¥ó¥È¤·¤¿¥æ¡¼¥¶ */
|
|
int f_type; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥¿¥¤¥× */
|
|
int f_flags; /* ¥Þ¥¦¥ó¥È¥Õ¥é¥°¤Î¥³¥Ô¡¼ */
|
|
long f_syncwrites; /* ¥Þ¥¦¥ó¥È¤·¤Æ¤«¤é¤ÎƱ´ü½ñ¹þ¤ß¿ô */
|
|
long f_asyncwrites; /* ¥Þ¥¦¥ó¥È¤·¤Æ¤«¤é¤ÎÈóƱ´ü½ñ¹þ¤ß¿ô */
|
|
char f_fstypename[MFSNAMELEN];/* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¥¿¥¤¥×̾ */
|
|
char f_mntonname[MNAMELEN]; /* ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È */
|
|
long f_syncreads; /* ¥Þ¥¦¥ó¥È°Ê¹ß¤ÎƱ´üÆɼè¤ê¿ô */
|
|
long f_asyncreads; /* ¥Þ¥¦¥ó¥È°Ê¹ß¤ÎÈóƱ´üÆɼè¤ê¿ô */
|
|
char f_mntfromname[MNAMELEN]; /* ¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à */
|
|
};
|
|
.Ed
|
|
Ìᤵ¤ì¤ë²ÄǽÀ¤¬¤¢¤ë¥Õ¥é¥°¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹:
|
|
.Bl -tag -width MNT_SYNCHRONOUS
|
|
.It Dv MNT_RDONLY
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬Æɼè¤êÀìÍѤǥޥ¦¥ó¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
¥¹¡¼¥Ñ¥æ¡¼¥¶¤Ç¤â½ñ¹þ¤á¤Þ¤»¤ó¡£
|
|
.It Dv MNT_NOEXEC
|
|
¤½¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤«¤é¥Õ¥¡¥¤¥ë¤ò¼Â¹Ô¤Ç¤¤Þ¤»¤ó¡£
|
|
.It Dv MNT_NOSUID
|
|
¥Õ¥¡¥¤¥ë¤Î setuid ¥Ó¥Ã¥È¤È setgid ¥Ó¥Ã¥È¤¬¡¢
|
|
¥Õ¥¡¥¤¥ë¤Î¼Â¹Ô»þ¤Ë¼õ¤±Æþ¤ì¤é¤ì¤Þ¤»¤ó¡£
|
|
.It Dv MNT_NODEV
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÆüì¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó¡£
|
|
.It Dv MNT_SYNCHRONOUS
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ø¤Î¤¹¤Ù¤Æ¤ÎÆþ½ÐÎϤ¬¡¢Æ±´ü¤ò¼è¤Ã¤Æ¼Â¹Ô¤µ¤ì¤Þ¤¹¡£
|
|
.It Dv MNT_ASYNC
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÆþ½ÐÎϤ¬¡¢Æ±´ü¤ò¼è¤Ã¤Æ¼Â¹Ô¤µ¤ì¤Þ¤»¤ó¡£
|
|
.It Dv MNT_LOCAL
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¥í¡¼¥«¥ë¤Ë¾ïÃ󤷤Ƥ¤¤Þ¤¹¡£
|
|
.It Dv MNT_QUOTA
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¥¯¥©¡¼¥¿¤¬Í¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
|
|
.It Dv MNT_ROOTFS
|
|
¥ë¡¼¥È¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò³Îǧ¤·¤Þ¤¹¡£
|
|
.It Dv MNT_EXRDONLY
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢Æɼè¤êÀìÍѤǥ¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤¹¡£
|
|
.It Dv MNT_EXPORTED
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢Æɤ߽ñ¤¤ÎξÊý¤Ç¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤¹¡£
|
|
.It Dv MNT_DEFEXPORTED
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢Æɤ߽ñ¤¤ÎξÊý¤Ç
|
|
Ǥ°Õ¤Î¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥Û¥¹¥È¤Ë¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤¹¡£
|
|
.It Dv MNT_EXPORTANON
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢¤¹¤Ù¤Æ¤Î¥ê¥â¡¼¥È¥¢¥¯¥»¥¹¤òƿ̾¥æ¡¼¥¶¤Ë¥Þ¥Ã¥×¤·¤Þ¤¹¡£
|
|
.It Dv MNT_EXKERB
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢Kerberos uid ¥Þ¥Ã¥Ô¥ó¥°¤Ç¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤¹¡£
|
|
.El
|
|
.Pp
|
|
ÆÃÄê¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¥Õ¥£¡¼¥ë¥É¤Ï¡¢-1 ¤ËÀßÄꤵ¤ì¤Þ¤¹¡£
|
|
.Fn fstatfs
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢µ½Ò»Ò
|
|
.Fa fd
|
|
¤Ç»²¾È¤µ¤ì¤ë¥ª¡¼¥×¥ó¥Õ¥¡¥¤¥ë¤ËÂФ·¤ÆƱ¤¸¾ðÊó¤òÌᤷ¤Þ¤¹¡£
|
|
.Sh Ìá¤êÃÍ
|
|
.Rv -std
|
|
.Sh ¥¨¥é¡¼
|
|
.Fn statfs
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢°Ê²¼¤Î¤¦¤Á¤Î 1 ¤Ä°Ê¾å¤¬¿¿¤Ç¤¢¤ë¾ì¹ç¤Ë¥¨¥é¡¼¤È¤Ê¤ê¤Þ¤¹:
|
|
.Bl -tag -width Er
|
|
.It Bq Er ENOTDIR
|
|
.Fa path
|
|
¤Î¥Ñ¥¹¤Î¹½À®Í×ÁÇÃæ¤Ë¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¤â¤Î¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ENAMETOOLONG
|
|
.Fa path
|
|
¤Î¹½À®Í×ÁǤ¬ 255 ʸ»ú¤ò±Û¤¨¤Æ¤¤¤ë¤«¡¢¤Þ¤¿¤Ï
|
|
.Fa path
|
|
Á´ÂΤ¬ 1023 ʸ»ú¤ò±Û¤¨¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ENOENT
|
|
.Fa path
|
|
¤Î»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Þ¤»¤ó¡£
|
|
.It Bq Er EACCES
|
|
.Fa path
|
|
¤Ë¤Ï¡¢¸¡º÷¤¬µö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤¥Ç¥£¥ì¥¯¥È¥ê¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ELOOP
|
|
.Fa path
|
|
¤òÊÑ´¹¤¹¤ë¤È¤¤Ë¸¡½Ð¤µ¤ì¤¿¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤¬Â¿¤¹¤®¤Þ¤¹¡£
|
|
.It Bq Er EFAULT
|
|
.Fa buf
|
|
°ú¿ô¤Þ¤¿¤Ï
|
|
.Fa path
|
|
°ú¿ô¤¬¡¢ÉÔÀµ¤Ê¥¢¥É¥ì¥¹¤ò»Ø¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er EIO
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ËÆɤ߽ñ¤¤·¤Æ¤¤¤ë´Ö¤ËÆþ½ÐÎÏ¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£
|
|
.El
|
|
.Pp
|
|
.Fn fstatfs
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢°Ê²¼¤Î¤¦¤Á 1 ¤Ä°Ê¾å¤¬¿¿¤Ç¤¢¤ë¾ì¹ç¤Ë¥¨¥é¡¼¤È¤Ê¤ê¤Þ¤¹:
|
|
.Bl -tag -width Er
|
|
.It Bq Er EBADF
|
|
.Fa fd
|
|
°ú¿ô¤¬Í¸ú¥ª¡¼¥×¥ó¥Õ¥¡¥¤¥ëµ½Ò»Ò¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
|
|
.It Bq Er EFAULT
|
|
.Fa buf
|
|
°ú¿ô¤¬ÉÔÀµ¤Ê¥¢¥É¥ì¥¹¤ò»Ø¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er EIO
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ËÆɤ߽ñ¤¤·¤Æ¤¤¤ë´Ö¤Ë
|
|
.Tn I/O
|
|
(Æþ½ÐÎÏ) ¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£
|
|
.El
|
|
.Sh Îò»Ë
|
|
.Fn statfs
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢
|
|
.Bx 4.4
|
|
¤Ç¤Ï¤¸¤á¤ÆÅо줷¤Þ¤·¤¿¡£
|