doc/documentation/manual-pages/ja/man2/statfs.2
Sergio Carlavilla Delgado 989d921f5d Migrate doc to Hugo/AsciiDoctor
I'm very pleased to announce the release of
our new website and documentation using
the new toolchain with Hugo and AsciiDoctor.

To get more information about the new toolchain
please read the FreeBSD Documentation Project Primer[1],
Hugo docs[2] and AsciiDoctor docs[3].

Acknowledgment:
Benedict Reuschling <bcr@>
Glen Barber <gjb@>
Hiroki Sato <hrs@>
Li-Wen Hsu <lwhsu@>
Sean Chittenden <seanc@>
The FreeBSD Foundation

[1] https://docs.FreeBSD.org/en/books/fdp-primer/
[2] https://gohugo.io/documentation/
[3] https://docs.asciidoctor.org/home/

Approved by:    doceng, core
2021-01-26 00:31:29 +01:00

219 lines
7.3 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.25 2004/07/20 19:30:57 csjp Exp %
.\"
.\" $FreeBSD$
.Dd November 16, 2003
.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 /* Ìá¤êÃͤÎÍѤΥХåե¡¤ÎŤµ */
#define STATFS_VERSION 0x20030518 /* ¸½ºß¤Î¥Ð¡¼¥¸¥ç¥óÈÖ¹æ */
struct statfs {
uint32_t f_version; /* ¹½Â¤ÂΤΥС¼¥¸¥ç¥óÈÖ¹æ */
uint32_t f_type; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥¿¥¤¥× */
uint64_t f_flags; /* ¥Þ¥¦¥ó¥È¥Õ¥é¥°¤Î¥³¥Ô¡¼ */
uint64_t f_bsize; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÃÇÊÒ¥µ¥¤¥º */
uint64_t f_iosize; /* ºÇŬ¤ÊžÁ÷¥Ö¥í¥Ã¥¯¥µ¥¤¥º */
uint64_t f_blocks; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Î¹ç·×¥Ç¡¼¥¿¥Ö¥í¥Ã¥¯¥µ¥¤¥º */
uint64_t f_bfree; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤ÎÍøÍѲÄǽ¤Ê¥Ö¥í¥Ã¥¯ */
int64_t f_bavail; /* ¥¹¡¼¥Ñ¥æ¡¼¥¶°Ê³°¤¬ÍøÍѲÄǽ¤Ê¥Ö¥í¥Ã¥¯ */
uint64_t f_files; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Î¹ç·×¥Î¡¼¥É¿ô */
int64_t f_ffree; /* ¥¹¡¼¥Ñ¥æ¡¼¥¶°Ê³°¤¬ÍøÍѲÄǽ¤Ê¥Î¡¼¥É¿ô */
uint64_t f_syncwrites; /* ¥Þ¥¦¥ó¥È¤·¤Æ¤«¤é¤ÎƱ´ü½ñ¹þ¤ß¿ô */
uint64_t f_asyncwrites; /* ¥Þ¥¦¥ó¥È¤·¤Æ¤«¤é¤ÎÈ󯱴ü½ñ¹þ¤ß¿ô */
uint64_t f_syncreads; /* ¥Þ¥¦¥ó¥È¤·¤Æ¤«¤é¤ÎƱ´üÆÉ¼è¤ê¿ô */
uint64_t f_asyncreads; /* ¥Þ¥¦¥ó¥È¤·¤Æ¤«¤é¤ÎÈ󯱴üÆÉ¼è¤ê¿ô */
uint64_t f_spare[10]; /* ̤»ÈÍÑÎΰè */
uint32_t f_namemax; /* ¥Õ¥¡¥¤¥ë̾¤ÎŤµ¤ÎºÇÂç */
uid_t f_owner; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¥Þ¥¦¥ó¥È¤·¤¿¥æ¡¼¥¶ */
fsid_t f_fsid; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à ID */
char f_charspare[80]; /* ¸å¤Î¤¿¤á¤Î;Çò */
char f_fstypename[MFSNAMELEN]; /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥¿¥¤¥×̾ */
char f_mntfromname[MNAMELEN]; /* ¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à */
char f_mntonname[MNAMELEN]; /* ¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥Þ¥¦¥ó¥È */
};
.Ed
.Pp
Ìᤵ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ë¥Õ¥é¥°¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹:
.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_SOFTDEP
¥½¥Õ¥È¥¢¥Ã¥×¥Ç¡¼¥È¤¬Æ°ºî¤·¤Þ¤¹
.Xr ( ffs 7
¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤)¡£
.It Dv MNT_SUIDDIR
¥Ç¥£¥ì¥¯¥È¥ê¤Î SUID ¥Ó¥Ã¥È¤òÆÃÊ̤˼è¤ê°·¤¤¤Þ¤¹¡£
.It Dv MNT_UNION
²¼ÁؤΥե¡¥¤¥ë¥·¥¹¥Æ¥à¤È¤Î¥æ¥Ë¥ª¥ó¡£
.It Dv MNT_NOSYMFOLLOW
¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤òé¤ê¤Þ¤»¤ó¡£
.It Dv MNT_NOCLUSTERR
ÆÉ¤ß¼è¤ê¥¯¥é¥¹¥¿¥ê¥ó¥°¤¬Ìµ¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
.It Dv MNT_NOCLUSTERW
½ñ¤­¹þ¤ß¥¯¥é¥¹¥¿¥ê¥ó¥°¤¬Ìµ¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
.\".It Dv MNT_JAILDEVFS
.\"XXX
.It Dv MNT_MULTILABEL
³Æ¥ª¥Ö¥¸¥§¥¯¥È¤ËÂФ¹¤ë Mandatory Access Control (MAC) ¥µ¥Ý¡¼¥È
.Xr ( mac 4
¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤)¡£
.It Dv MNT_ACLS
Access Control List (ACL) ¥µ¥Ý¡¼¥È¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
.It Dv MNT_LOCAL
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¥í¡¼¥«¥ë¤Ë¾ïÃ󤷤Ƥ¤¤Þ¤¹¡£
.It Dv MNT_QUOTA
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¥¯¥©¡¼¥¿¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
.It Dv MNT_ROOTFS
¥ë¡¼¥È¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò³Îǧ¤·¤Þ¤¹¡£
.It Dv MNT_EXRDONLY
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢ÆÉ¼è¤êÀìÍѤǥ¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤¹¡£
.It Dv MNT_NOATIME
¥Õ¥¡¥¤¥ë¥¢¥¯¥»¥¹»þ¹ï¤Î¹¹¿·¤¬Ìµ¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
.It Dv MNT_USER
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¥æ¡¼¥¶¤Ë¤è¤Ã¤Æ¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
.\".It Dv MNT_IGNORE
.\"XXX
.It Dv MNT_EXPORTED
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢ÆÉ¤ß½ñ¤­¤ÎξÊý¤Ç¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤¹¡£
.It Dv MNT_DEFEXPORTED
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢ÆÉ¤ß½ñ¤­¤ÎξÊý¤Ç
Ǥ°Õ¤Î¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥Û¥¹¥È¤Ë¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤¹¡£
.It Dv MNT_EXPORTANON
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢¤¹¤Ù¤Æ¤Î¥ê¥â¡¼¥È¥¢¥¯¥»¥¹¤òƿ̾¥æ¡¼¥¶¤Ë¥Þ¥Ã¥×¤·¤Þ¤¹¡£
.It Dv MNT_EXKERB
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢Kerberos uid ¥Þ¥Ã¥Ô¥ó¥°¤Ç¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤¹¡£
.It Dv MNT_EXPUBLIC
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢°ìÈ̸ø³«¤µ¤ì¤Æ¤¤¤Þ¤¹ (WebNFS)¡£
.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
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ËÆÉ¤ß½ñ¤­¤·¤Æ¤¤¤ë´Ö¤Ë
.Tn Æþ½ÐÎÏ
¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£
.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
¤Ç¤Ï¤¸¤á¤ÆÅо줷¤Þ¤·¤¿¡£