OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / release / 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 .SH 名前
45 ustat \- ファイル・システム (file system) の統計を得る
46 .SH 書式
47 .nf
48 .B #include <sys/types.h>
49 .br
50 .BR "#include <unistd.h>" "    /* libc[45] */"
51 .br
52 .BR "#include <ustat.h>" "     /* glibc2 */"
53 .sp
54 .BI "int ustat(dev_t " dev ", struct ustat *" ubuf );
55 .fi
56 .SH 説明
57 .BR ustat ()
58 はマウント (mount) されたファイル・システムの情報を返す。
59 .I dev
60 は調べるファイル・システムを含んでいるデバイス (device) の
61 デバイス番号。
62 .I ubuf
63 は以下のメンバーを含む ustat 構造体へのポインター:
64 .in +4n
65 .nf
66
67 daddr_t f_tfree;      /* Total free blocks */
68 ino_t   f_tinode;     /* Number of free inodes */
69 char    f_fname[6];   /* Filsys name */
70 char    f_fpack[6];   /* Filsys pack name */
71 .fi
72 .in
73 .PP
74 後の二つのフィールド
75 .I f_fname
76
77 .I f_fpack
78 は実装されておらず、常に NULL バイト (\(aq\\0\(aq) で埋められる。
79 .SH 返り値
80 成功した場合にはゼロが返され、
81 .I ubuf
82 が指す
83 .I ustat
84 構造体が埋められる。
85 エラーの場合は \-1 が返され、
86 .I errno
87 が適切に設定される。
88 .SH エラー
89 .TP
90 .B EFAULT
91 .I ubuf
92 がアクセス可能な空間の外側を指している。
93 .TP
94 .B EINVAL
95 .I dev
96 がマウントされたファイル・システムを含むデバイスを参照していない。
97 .TP
98 .B ENOSYS
99 .I dev
100 で参照されるマウントされたファイル・システムがこの操作 (operation) を
101 サポートしていないか、Linux のバージョンが 1.3.16 以前である。
102 .SH 準拠
103 SVr4.
104 .\" SVr4 には他に ENOLINK, ECOMM, EINTR についての記述があるが、
105 .\" ENOSYS エラーについての記述はない。
106 .SH 注意
107 .BR ustat ()
108 は推奨されず、互換性のためだけに提供される。
109 新しいプログラムは全てこれの代りに
110 .BR statfs (2)
111 を使用するべきである。
112 .SS "HP-UX における注意"
113 HP-UX 版の構造体
114 .I ustat
115 には、その他にフィールド
116 .I f_blksize
117 が存在するが、他では見かけない。
118 HP-UX は次のように警告している:
119 ファイルシステムの中には、解放されている inode の数を変更しないものもある。
120 このようなファイルシステムは、フィールド
121 .I f_tinode
122 に \-1 を返す。
123 .\" ファイルシステムが NFS であるか否かをテストするために
124 .\" これを使用するソフトウェアもある。
125 ファイルシステムの中には、inode を動的に確保するものもある。
126 このようなファイルシステムは、現在解放されている inode の数を返す。
127 .SH 関連項目
128 .BR stat (2),
129 .BR statfs (2)