OSDN Git Service

b8921004f200e729cdb81ebee1eb6c0c48b69611
[linuxjm/LDP_man-pages.git] / draft / man2 / ustat.2
1 .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Created  1995-08-09 Thomas K. Dyas <tdyas@eden.rutgers.edu>
26 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
27 .\" Modified 2001-03-22 by aeb
28 .\" Modified 2003-08-04 by aeb
29 .\"
30 .\"*******************************************************************
31 .\"
32 .\" This file was generated with po4a. Translate the source file.
33 .\"
34 .\"*******************************************************************
35 .TH USTAT 2 2003\-08\-04 Linux "Linux Programmer's Manual"
36 .SH 名前
37 ustat \- ファイルシステム (file system) の統計を得る
38 .SH 書式
39 .nf
40 \fB#include <sys/types.h>\fP
41 .br
42 \fB#include <unistd.h>\fP    /* libc[45] */
43 .br
44 \fB#include <ustat.h>\fP     /* glibc2 */
45 .sp
46 \fBint ustat(dev_t \fP\fIdev\fP\fB, struct ustat *\fP\fIubuf\fP\fB);\fP
47 .fi
48 .SH 説明
49 \fBustat\fP()  はマウント (mount) されたファイルシステムの情報を返す。 \fIdev\fP は調べるファイルシステムを含んでいるデバイス
50 (device) の デバイス番号。 \fIubuf\fP は以下のメンバーを含む ustat 構造体へのポインター:
51 .in +4n
52 .nf
53
54 daddr_t f_tfree;      /* Total free blocks */
55 ino_t   f_tinode;     /* Number of free inodes */
56 char    f_fname[6];   /* Filsys name */
57 char    f_fpack[6];   /* Filsys pack name */
58 .fi
59 .in
60 .PP
61 後の二つのフィールド \fIf_fname\fP と \fIf_fpack\fP は実装されておらず、常に NULL バイト (\(aq\e0\(aq)
62 で埋められる。
63 .SH 返り値
64 成功した場合にはゼロが返され、 \fIubuf\fP が指す \fIustat\fP 構造体が埋められる。 エラーの場合は \-1 が返され、 \fIerrno\fP
65 が適切に設定される。
66 .SH エラー
67 .TP 
68 \fBEFAULT\fP
69 \fIubuf\fP がアクセス可能な空間の外側を指している。
70 .TP 
71 \fBEINVAL\fP
72 \fIdev\fP がマウントされたファイルシステムを含むデバイスを参照していない。
73 .TP 
74 \fBENOSYS\fP
75 \fIdev\fP で参照されるマウントされたファイルシステムがこの操作 (operation) を サポートしていないか、Linux のバージョンが
76 1.3.16 以前である。
77 .SH 準拠
78 .\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
79 .\" but has no ENOSYS condition.
80 SVr4.
81 .SH 注意
82 \fBustat\fP()  は推奨されず、互換性のためだけに提供される。 新しいプログラムは全てこれの代りに \fBstatfs\fP(2)
83 を使用するべきである。
84 .SS "HP\-UX における注意"
85 .\" Some software tries to use this in order to test whether the
86 .\" underlying file system is NFS.
87 HP\-UX 版の構造体 \fIustat\fP には、その他にフィールド \fIf_blksize\fP が存在するが、他では見かけない。 HP\-UX
88 は次のように警告している: ファイルシステムの中には、解放されている inode の数を変更しないものもある。 このようなファイルシステムは、フィールド
89 \fIf_tinode\fP に \-1 を返す。 ファイルシステムの中には、inode を動的に確保するものもある。
90 このようなファイルシステムは、現在解放されている inode の数を返す。
91 .SH 関連項目
92 \fBstat\fP(2), \fBstatfs\fP(2)
93 .SH この文書について
94 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
95 である。プロジェクトの説明とバグ報告に関する情報は
96 http://www.kernel.org/doc/man\-pages/ に書かれている。