OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[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 .\"*******************************************************************
29 .\"
30 .\" This file was generated with po4a. Translate the source file.
31 .\"
32 .\"*******************************************************************
33 .TH USTAT 2 2003\-08\-04 Linux "Linux Programmer's Manual"
34 .SH 名前
35 ustat \- ファイルシステム (file system) の統計を得る
36 .SH 書式
37 .nf
38 \fB#include <sys/types.h>\fP
39 .br
40 \fB#include <unistd.h>\fP    /* libc[45] */
41 .br
42 \fB#include <ustat.h>\fP     /* glibc2 */
43 .sp
44 \fBint ustat(dev_t \fP\fIdev\fP\fB, struct ustat *\fP\fIubuf\fP\fB);\fP
45 .fi
46 .SH 説明
47 \fBustat\fP()  はマウント (mount) されたファイルシステムの情報を返す。 \fIdev\fP は調べるファイルシステムを含んでいるデバイス
48 (device) の デバイス番号。 \fIubuf\fP は以下のメンバーを含む ustat 構造体へのポインター:
49 .in +4n
50 .nf
51
52 daddr_t f_tfree;      /* Total free blocks */
53 ino_t   f_tinode;     /* Number of free inodes */
54 char    f_fname[6];   /* Filsys name */
55 char    f_fpack[6];   /* Filsys pack name */
56 .fi
57 .in
58 .PP
59 後の二つのフィールド \fIf_fname\fP と \fIf_fpack\fP は実装されておらず、常に NULL バイト (\(aq\e0\(aq)
60 で埋められる。
61 .SH 返り値
62 成功した場合にはゼロが返され、 \fIubuf\fP が指す \fIustat\fP 構造体が埋められる。 エラーの場合は \-1 が返され、 \fIerrno\fP
63 が適切に設定される。
64 .SH エラー
65 .TP 
66 \fBEFAULT\fP
67 \fIubuf\fP がアクセス可能な空間の外側を指している。
68 .TP 
69 \fBEINVAL\fP
70 \fIdev\fP がマウントされたファイルシステムを含むデバイスを参照していない。
71 .TP 
72 \fBENOSYS\fP
73 \fIdev\fP で参照されるマウントされたファイルシステムがこの操作 (operation) を サポートしていないか、Linux のバージョンが
74 1.3.16 以前である。
75 .SH 準拠
76 .\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
77 .\" but has no ENOSYS condition.
78 SVr4.
79 .SH 注意
80 \fBustat\fP()  は推奨されず、互換性のためだけに提供される。 新しいプログラムは全てこれの代りに \fBstatfs\fP(2)
81 を使用するべきである。
82 .SS "HP\-UX における注意"
83 .\" Some software tries to use this in order to test whether the
84 .\" underlying file system is NFS.
85 HP\-UX 版の構造体 \fIustat\fP には、その他にフィールド \fIf_blksize\fP が存在するが、他では見かけない。 HP\-UX
86 は次のように警告している: ファイルシステムの中には、解放されている inode の数を変更しないものもある。 このようなファイルシステムは、フィールド
87 \fIf_tinode\fP に \-1 を返す。 ファイルシステムの中には、inode を動的に確保するものもある。
88 このようなファイルシステムは、現在解放されている inode の数を返す。
89 .SH 関連項目
90 \fBstat\fP(2), \fBstatfs\fP(2)