OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / statvfs.2
1 .\" Copyright (C) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" The pathconf note is from Walter Harms
24 .\" This is not a system call on Linux
25 .\"
26 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
27 .\"
28 .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
29 .\"         all rights reserved.
30 .\" Translated Tue Jun 29 23:36:41 JST 2004
31 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
32 .\" Updated & Modified Sun Jan  9 22:50:29 JST 2005 by Yuichi SATO
33 .\"
34 .TH STATVFS 2 2003-08-22 "Linux" "Linux Programmer's Manual"
35 .\"O .SH NAME
36 .SH Ì¾Á°
37 .\"O statvfs, fstatvfs \- get file system statistics
38 statvfs, fstatvfs \- ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÅý·×¤ò¼èÆÀ¤¹¤ë
39 .\"O .SH SYNOPSIS
40 .SH ½ñ¼°
41 .B #include <sys/statvfs.h>
42 .sp
43 .BI "int statvfs(const char *" path ", struct statvfs *" buf );
44 .br
45 .BI "int fstatvfs(int " fd ", struct statvfs *" buf );
46 .\"O .SH DESCRIPTION
47 .SH ÀâÌÀ
48 .\"O The function
49 .\"O .BR statvfs ()
50 .\"O returns information about a mounted file system.
51 ´Ø¿ô
52 .BR statvfs ()
53 ¤Ï¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤òÊÖ¤¹¡£
54 .\"O .I path
55 .\"O is the pathname of any file within the mounted file system.
56 .I path
57 ¤Ï¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥àÃæ¤ÎǤ°Õ¤Î¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹Ì¾¤Ç¤¢¤ë¡£
58 .\"O .I buf
59 .\"O is a pointer to a
60 .\"O .I statvfs
61 .\"O structure defined approximately as follows:
62 .I buf
63 ¤Ï¡¢¤À¤¤¤¿¤¤°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë
64 .I statvfs
65 ¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤Ç¤¢¤ë:
66
67 .in +4n
68 .nf
69 struct statvfs {
70 .\"O     unsigned long  f_bsize;    /* file system block size */
71 .\"O     unsigned long  f_frsize;   /* fragment size */
72 .\"O     fsblkcnt_t     f_blocks;   /* size of fs in f_frsize units */
73 .\"O     fsblkcnt_t     f_bfree;    /* # free blocks */
74 .\"O     fsblkcnt_t     f_bavail;   /* # free blocks for unprivileged users */
75 .\"O     fsfilcnt_t     f_files;    /* # inodes */
76 .\"O     fsfilcnt_t     f_ffree;    /* # free inodes */
77 .\"O     fsfilcnt_t     f_favail;   /* # free inodes for unprivileged users */
78 .\"O     unsigned long  f_fsid;     /* file system ID */
79 .\"O     unsigned long  f_flag;     /* mount flags */
80 .\"O     unsigned long  f_namemax;  /* maximum filename length */
81     unsigned long  f_bsize;    /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥Ö¥í¥Ã¥¯¥µ¥¤¥º */
82     unsigned long  f_frsize;   /* ¥Õ¥é¥°¥á¥ó¥È¥µ¥¤¥º */
83     fsblkcnt_t     f_blocks;   /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥µ¥¤¥º (f_frsize Ã±°Ì) */
84     fsblkcnt_t     f_bfree;    /* ²òÊü¤µ¤ì¤Æ¤¤¤ë¥Ö¥í¥Ã¥¯¿ô */
85     fsblkcnt_t     f_bafvail;   /* ÈóÆø¢¥æ¡¼¥¶ÍѤ˲òÊü¤µ¤ì¤Æ¤¤¤ë¥Ö¥í¥Ã¥¯¿ô */
86     fsfilcnt_t     f_files;    /* inode ¿ô */
87     fsfilcnt_t     f_ffree;    /* ²òÊü¤µ¤ì¤Æ¤¤¤ë inode ¤Î¿ô */
88     fsfilcnt_t     f_favail;   /* ÈóÆø¢¥æ¡¼¥¶ÍѤ˲òÊü¤µ¤ì¤Æ¤¤¤ë inode ¤Î¿ô */
89     unsigned long  f_fsid;     /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à ID */
90     unsigned long  f_flag;     /* ¥Þ¥¦¥ó¥È¥Õ¥é¥° */
91     unsigned long  f_namemax;  /* ¥Õ¥¡¥¤¥ë̾¤ÎŤµ¤ÎºÇÂçÃÍ */
92 };
93 .fi
94 .in
95
96 .\"O Here the types
97 .\"O .I fsblkcnt_t
98 .\"O and
99 .\"O .I fsfilcnt_t
100 .\"O are defined in
101 .\"O .IR <sys/types.h> .
102 ¤³¤³¤Ç¡¢·¿
103 .I fsblkcnt_t
104 ¤È
105 .I fsfilcnt_t
106 ¤Ï
107 .I <sys/types.h>
108 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
109 .\"O Both used to be
110 .\"O .IR "unsigned long" .
111 ¤«¤Ä¤Æ¡¢¤³¤ì¤é¤Ï¶¦¤Ë
112 .I "unsigned long"
113 ¤Ç¤¢¤Ã¤¿¡£
114
115 .\"O The field
116 .\"O .I f_flag
117 .\"O is a bit mask (of mount flags, see
118 .\"O .BR mount (8)).
119 ¥Õ¥£¡¼¥ë¥É
120 .I f_flag
121 ¤Ï (¥Þ¥¦¥ó¥È¥Õ¥é¥°¤Î) ¥Ó¥Ã¥È¥Þ¥¹¥¯¤Ç¤¢¤ë
122 (¥Þ¥¦¥ó¥È¥Õ¥é¥°¤Ë¤Ä¤¤¤Æ¤Ï¡¢
123 .BR mount (8)
124 ¤ò»²¾È¤¹¤ë¤³¤È)¡£
125 .\"O Bits defined by POSIX are
126 POSIX ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥Ó¥Ã¥È¤Ï°Ê²¼¤ÎÄ̤ê:
127 .TP
128 .B ST_RDONLY
129 .\"O Read-only file system.
130 Æɤ߹þ¤ßÀìÍѤΥե¡¥¤¥ë¥·¥¹¥Æ¥à¡£
131 .TP
132 .B ST_NOSUID
133 .\"O Set-user-id/set-group-ID bits are ignored by
134 .\"O .BR exec (3).
135 .BR exec (3)
136 ¤Ë̵»ë¤µ¤ì¤ë set-user-id/set-group-ID ¥Ó¥Ã¥È¡£
137 .LP
138 .\"O It is unspecified whether all members of the returned struct
139 .\"O have meaningful values on all file systems.
140 ÊÖ¤µ¤ì¤¿¹½Â¤ÂΤÎÁ´¤Æ¤Î¥á¥ó¥Ð¤¬Á´¤Æ¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç
141 °ÕÌ£¤Î¤¢¤ëÃͤǤ¢¤ë¤«Èݤ«¤Ï¡¢»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
142
143 .\"O .BR fstatvfs ()
144 .\"O returns the same information about an open file referenced by descriptor
145 .\"O .IR fd .
146 .BR fstatvfs ()
147 ¤Ï¡¢¥Ç¥£¥¹¥¯¥ê¥×¥¿
148 .I fd
149 ¤Ç»²¾È¤µ¤ì¤ë¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¡¢Æ±¤¸¾ðÊó¤òÊÖ¤¹¡£
150 .\"O .SH "RETURN VALUE"
151 .SH ÊÖ¤êÃÍ
152 .\"O On success, zero is returned.
153 .\"O On error, \-1 is returned, and
154 .\"O .I errno
155 .\"O is set appropriately.
156 À®¸ù¤·¤¿¾ì¹ç¡¢0 ¤¬ÊÖ¤µ¤ì¤ë¡£
157 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¤Æ¡¢
158 .I errno
159 ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
160 .\"O .SH ERRORS
161 .SH ¥¨¥é¡¼
162 .TP
163 .B EACCES
164 .\"O .RB ( statvfs ())
165 .\"O Search permission is denied for a component of the path prefix of
166 .\"O .IR path .
167 .\"O (See also
168 .\"O .BR path_resolution (7).)
169 .RB ( statvfs ()
170 ¤Î¾ì¹ç)
171 .I path
172 ¤Î¥Ç¥£¥ì¥¯¥È¥êÉôʬ¤Ë¸¡º÷µö²Ä¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Ê¤¤
173 .RB ( path_resolution (7)
174 ¤â»²¾È¤¹¤ë¤³¤È)¡£
175 .TP
176 .B EBADF
177 .\"O .RB ( fstatvfs ())
178 .\"O .I fd
179 .\"O is not a valid open file descriptor.
180 .RB ( fstatvfs ()
181 ¤Î¾ì¹ç)
182 .I fd
183 ¤¬Í­¸ú¤Ê¥ª¡¼¥×¥ó¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ï¤Ê¤¤¡£
184 .TP
185 .B EFAULT
186 .\"O .I Buf
187 .\"O or
188 .\"O .I path
189 .\"O points to an invalid address.
190 .I buf
191 ¤Þ¤¿¤Ï
192 .I path
193 ¤¬Ìµ¸ú¤Ê¥¢¥É¥ì¥¹¤ò»Ø¤·¤Æ¤¤¤ë¡£
194 .TP
195 .B EINTR
196 .\"O This call was interrupted by a signal.
197 ¤³¤Î¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¤Ë¤è¤Ã¤ÆÃæÃǤµ¤ì¤¿¡£
198 .TP
199 .B EIO
200 .\"O An I/O error occurred while reading from the file system.
201 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤«¤éÆɤ߽Ф·¤Æ¤¤¤ë´Ö¤Ë I/O ¥¨¥é¡¼¤¬È¯À¸¤·¤¿¡£
202 .TP
203 .B ELOOP
204 .\"O .RB ( statvfs ())
205 .\"O Too many symbolic links were encountered in translating
206 .\"O .IR path .
207 .RB ( statvfs ()
208 ¤Î¾ì¹ç)
209 .I path
210 ¤Ë¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤¬Â¿¤¹¤®¤ë¡£
211 .TP
212 .B ENAMETOOLONG
213 .\"O .RB ( statvfs ())
214 .\"O .I path
215 .\"O is too long.
216 .RB ( statvfs ()
217 ¤Î¾ì¹ç)
218 .I path
219 ¤¬Ä¹¤¹¤®¤ë¡£
220 .TP
221 .B ENOENT
222 .\"O .RB ( statvfs ())
223 .\"O The file referred to by
224 .\"O .I path
225 .\"O does not exist.
226 .RB ( statvfs ()
227 ¤Î¾ì¹ç)
228 .I path
229 ¤Ç»²¾È¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Ê¤¤¡£
230 .TP
231 .B ENOMEM
232 .\"O Insufficient kernel memory was available.
233 ½½Ê¬¤Ê¥«¡¼¥Í¥ë¥á¥â¥ê¤¬»ÈÍѤǤ­¤Ê¤¤¡£
234 .TP
235 .B ENOSYS
236 .\"O The file system does not support this call.
237 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¤³¤Î¸Æ¤Ó½Ð¤·¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¡£
238 .TP
239 .B ENOTDIR
240 .\"O .RB ( statvfs ())
241 .\"O A component of the path prefix of
242 .\"O .I path
243 .\"O is not a directory.
244 .RB ( statvfs ()
245 ¤Î¾ì¹ç)
246 .I path
247 ¤Î¥Ç¥£¥ì¥¯¥È¥êÉôʬ¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ê¤¤¡£
248 .TP
249 .B EOVERFLOW
250 .\"O Some values were too large to be represented in the returned struct.
251 ¤¤¤¯¤Ä¤«¤ÎÃͤϡ¢ÊÖ¤µ¤ì¤ë¹½Â¤ÂΤÇɽ¸½¤¹¤ë¤Ë¤ÏÂ礭¤¹¤®¤ë¡£
252 .\"O .SH "CONFORMING TO"
253 .SH ½àµò
254 POSIX.1-2001.
255 .\"O .SH NOTES
256 .SH Ãí°Õ
257 .\"O The Linux kernel has system calls
258 .\"O .BR statfs (2)
259 .\"O and
260 .\"O .BR fstatfs (2)
261 .\"O to support this library call.
262 Linux ¥«¡¼¥Í¥ë¤Ë¤Ï¡¢¤³¤Î¥é¥¤¥Ö¥é¥ê¥³¡¼¥ë¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤¿¤á¤Ë¡¢
263 .BR statfs (2),
264 .BR fstatfs (2)
265 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬¤¢¤ë¡£
266
267 .\"O The current glibc implementations of
268 ¸½ºß¤Î glibc ¤Î¼ÂÁõ¤Ë¤ª¤¤¤Æ¡¢
269 .sp
270 .nf
271    pathconf(path, _PC_REC_XFER_ALIGN);
272    pathconf(path, _PC_ALLOC_SIZE_MIN);
273    pathconf(path, _PC_REC_MIN_XFER_SIZE);
274 .fi
275 .sp
276 .\"O respectively use the
277 .\"O .IR f_frsize ,
278 .\"O .IR f_frsize ,
279 .\"O and
280 .\"O .I f_bsize
281 .\"O fields of the return value of
282 .\"O .IR "statvfs(path,buf)" .
283 ¤Ï¡¢¤½¤ì¤¾¤ì
284 .I "statvfs(path,buf)"
285 ¤ÎÊÖ¤êÃͤÎ
286 .IR f_frsize ,
287 .IR f_frsize ,
288 .I f_bsize
289 ¥Õ¥£¡¼¥ë¥É¤ò»È¤¦¡£
290 .\"O .SH "SEE ALSO"
291 .SH ´ØÏ¢¹àÌÜ
292 .BR statfs (2)