OSDN Git Service

8f63837b536a5cc98c3ca194fecba77a761b1b38
[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 .\"
36 .\" Japanese Version Copyright (c) 1996 HANATAKA Shinya
37 .\"         all rights reserved.
38 .\" Translated Wed Dec  4 23:12:06 JST 1996
39 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
40 .\" Updated & Modified Sat May 22 19:00:40 JST 2004
41 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
42 .\"
43 .TH USTAT 2 2003\-08\-04 Linux "Linux Programmer's Manual"
44 .SH 名前
45 ustat \- get filesystem statistics
46 .SH 書式
47 .nf
48 \fB#include <sys/types.h>\fP
49 .br
50 \fB#include <unistd.h>\fP    /* libc[45] */
51 .br
52 \fB#include <ustat.h>\fP     /* glibc2 */
53 .sp
54 \fBint ustat(dev_t \fP\fIdev\fP\fB, struct ustat *\fP\fIubuf\fP\fB);\fP
55 .fi
56 .SH 説明
57 \fBustat\fP()  returns information about a mounted filesystem.  \fIdev\fP is a
58 device number identifying a device containing a mounted filesystem.  \fIubuf\fP
59 is a pointer to a \fIustat\fP structure that contains the following members:
60 .in +4n
61 .nf
62
63 daddr_t f_tfree;      /* Total free blocks */
64 ino_t   f_tinode;     /* Number of free inodes */
65 char    f_fname[6];   /* Filsys name */
66 char    f_fpack[6];   /* Filsys pack name */
67 .fi
68 .in
69 .PP
70 後の二つのフィールド \fIf_fname\fP と \fIf_fpack\fP は実装されておらず、常に NULL バイト (\(aq\e0\(aq)
71 で埋められる。
72 .SH 返り値
73 成功した場合にはゼロが返され、 \fIubuf\fP が指す \fIustat\fP 構造体が埋められる。 エラーの場合は \-1 が返され、 \fIerrno\fP
74 が適切に設定される。
75 .SH エラー
76 .TP 
77 \fBEFAULT\fP
78 \fIubuf\fP がアクセス可能な空間の外側を指している。
79 .TP 
80 \fBEINVAL\fP
81 \fIdev\fP does not refer to a device containing a mounted filesystem.
82 .TP 
83 \fBENOSYS\fP
84 The mounted filesystem referenced by \fIdev\fP does not support this operation,
85 or any version of Linux before 1.3.16.
86 .SH 準拠
87 .\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
88 .\" but has no ENOSYS condition.
89 SVr4.
90 .SH 注意
91 \fBustat\fP()  は推奨されず、互換性のためだけに提供される。 新しいプログラムは全てこれの代りに \fBstatfs\fP(2)
92 を使用するべきである。
93 .SS "HP\-UX における注意"
94 .\" Some software tries to use this in order to test whether the
95 .\" underlying filesystem is NFS.
96 The HP\-UX version of the \fIustat\fP structure has an additional field,
97 \fIf_blksize\fP, that is unknown elsewhere.  HP\-UX warns: For some filesystems,
98 the number of free inodes does not change.  Such filesystems will return \-1
99 in the field \fIf_tinode\fP.  For some filesystems, inodes are dynamically
100 allocated.  Such filesystems will return the current number of free inodes.
101 .SH 関連項目
102 \fBstat\fP(2), \fBstatfs\fP(2)
103 .SH この文書について
104 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
105 である。プロジェクトの説明とバグ報告に関する情報は
106 http://www.kernel.org/doc/man\-pages/ に書かれている。