OSDN Git Service

37b3620fe3173d2479a80e86a81172f9e10e0f81
[linuxjm/LDP_man-pages.git] / draft / man2 / ustat.2
1 .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
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 .\" Created  1995-08-09 Thomas K. Dyas <tdyas@eden.rutgers.edu>
24 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
25 .\" Modified 2001-03-22 by aeb
26 .\" Modified 2003-08-04 by aeb
27 .\"
28 .\" Japanese Version Copyright (c) 1996 HANATAKA Shinya
29 .\"         all rights reserved.
30 .\" Translated Wed Dec  4 23:12:06 JST 1996
31 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
32 .\" Updated & Modified Sat May 22 19:00:40 JST 2004
33 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
34 .\"
35 .\"WORD:        file system             ファイル・システム
36 .\"WORD:        mount                   マウント
37 .\"WORD:        device                  デバイス
38 .\"WORD:        member                  メンバー
39 .\"WORD:        NUL character           ヌル文字
40 .\"WORD:        implement               実装
41 .\"WORD:        pointer                 ポインター
42 .\"
43 .TH USTAT 2 2003-08-04 "Linux" "Linux Programmer's Manual"
44 .\"O .SH NAME
45 .SH 名前
46 .\"O ustat \- get file system statistics
47 ustat \- ファイル・システム (file system) の統計を得る
48 .\"O .SH SYNOPSIS
49 .SH 書式
50 .nf
51 .B #include <sys/types.h>
52 .br
53 .BR "#include <unistd.h>" "    /* libc[45] */"
54 .br
55 .BR "#include <ustat.h>" "     /* glibc2 */"
56 .sp
57 .BI "int ustat(dev_t " dev ", struct ustat *" ubuf );
58 .fi
59 .\"O .SH DESCRIPTION
60 .SH 説明
61 .\"O .BR ustat ()
62 .\"O returns information about a mounted file system.
63 .\"O .I dev
64 .\"O is a device number identifying a device containing
65 .\"O a mounted file system.
66 .BR ustat ()
67 はマウント (mount) されたファイル・システムの情報を返す。
68 .I dev
69 は調べるファイル・システムを含んでいるデバイス (device) の
70 デバイス番号。
71 .\"O .I ubuf
72 .\"O is a pointer to a \fIustat\fP structure that contains the following
73 .\"O members:
74 .I ubuf
75 は以下のメンバーを含む ustat 構造体へのポインター:
76 .in +4n
77 .nf
78
79 daddr_t f_tfree;      /* Total free blocks */
80 ino_t   f_tinode;     /* Number of free inodes */
81 char    f_fname[6];   /* Filsys name */
82 char    f_fpack[6];   /* Filsys pack name */
83 .fi
84 .in
85 .PP
86 .\"O The last two fields,
87 .\"O .I f_fname
88 .\"O and
89 .\"O .IR f_fpack ,
90 .\"O are not implemented and will
91 .\"O always be filled with null bytes (\(aq\\0\(aq).
92 後の二つのフィールド
93 .I f_fname
94
95 .I f_fpack
96 は実装されておらず、常に NULL バイト (\(aq\\0\(aq) で埋められる。
97 .\"O .SH "RETURN VALUE"
98 .SH 返り値
99 .\"O On success, zero is returned and the
100 .\"O .I ustat
101 .\"O structure pointed to by
102 .\"O .I ubuf
103 .\"O will be filled in.
104 .\"O On error, \-1 is returned, and
105 .\"O .I errno
106 .\"O is set appropriately.
107 成功した場合にはゼロが返され、
108 .I ubuf
109 が指す
110 .I ustat
111 構造体が埋められる。
112 エラーの場合は \-1 が返され、
113 .I errno
114 が適切に設定される。
115 .\"O .SH ERRORS
116 .SH エラー
117 .TP
118 .B EFAULT
119 .\"O .I ubuf
120 .\"O points outside of your accessible address space.
121 .I ubuf
122 がアクセス可能な空間の外側を指している。
123 .TP
124 .B EINVAL
125 .\"O .I dev
126 .\"O does not refer to a device containing a mounted file system.
127 .I dev
128 がマウントされたファイル・システムを含むデバイスを参照していない。
129 .TP
130 .B ENOSYS
131 .\"O The mounted file system referenced by
132 .\"O .I dev
133 .\"O does not support this operation, or any version of Linux before
134 .\"O 1.3.16.
135 .I dev
136 で参照されるマウントされたファイル・システムがこの操作 (operation) を
137 サポートしていないか、Linux のバージョンが 1.3.16 以前である。
138 .\"O .SH "CONFORMING TO"
139 .SH 準拠
140 SVr4.
141 .\"O .\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
142 .\"O .\" but has no ENOSYS condition.
143 .\" SVr4 には他に ENOLINK, ECOMM, EINTR についての記述があるが、
144 .\" ENOSYS エラーについての記述はない。
145 .\"O .SH NOTES
146 .SH 注意
147 .\"O .BR ustat ()
148 .\"O is deprecated and has only been provided for compatibility.
149 .BR ustat ()
150 は推奨されず、互換性のためだけに提供される。
151 .\"O All new programs should use
152 .\"O .BR statfs (2)
153 .\"O instead.
154 新しいプログラムは全てこれの代りに
155 .BR statfs (2)
156 を使用するべきである。
157 .\"O .SS "HP-UX Notes"
158 .SS "HP-UX における注意"
159 .\"O The HP-UX version of the
160 .\"O .I ustat
161 .\"O structure has an additional field,
162 .\"O .I f_blksize
163 .\"O that is unknown elsewhere.
164 .\"O HP-UX warns:
165 .\"O For some file systems, the number of free inodes does not change.
166 .\"O Such file systems will return \-1 in the field
167 .\"O .IR f_tinode .
168 HP-UX 版の構造体
169 .I ustat
170 には、その他にフィールド
171 .I f_blksize
172 が存在するが、他では見かけない。
173 HP-UX は次のように警告している:
174 ファイルシステムの中には、解放されている inode の数を変更しないものもある。
175 このようなファイルシステムは、フィールド
176 .I f_tinode
177 に \-1 を返す。
178 .\"O .\" Some software tries to use this in order to test whether the
179 .\"O .\" underlying file system is NFS.
180 .\" ファイルシステムが NFS であるか否かをテストするために
181 .\" これを使用するソフトウェアもある。
182 .\"O For some file systems, inodes are dynamically allocated.
183 .\"O Such file systems will return the current number of free inodes.
184 ファイルシステムの中には、inode を動的に確保するものもある。
185 このようなファイルシステムは、現在解放されている inode の数を返す。
186 .\"O .SH "SEE ALSO"
187 .SH 関連項目
188 .BR stat (2),
189 .BR statfs (2)