.\" Copyright (C) 1995, Thomas K. Dyas .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Created 1995-08-09 Thomas K. Dyas .\" Modified 1997-01-31 by Eric S. Raymond .\" Modified 2001-03-22 by aeb .\" Modified 2003-08-04 by aeb .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1996 HANATAKA Shinya .\" all rights reserved. .\" Translated Wed Dec 4 23:12:06 JST 1996 .\" by HANATAKA Shinya .\" Updated & Modified Sat May 22 19:00:40 JST 2004 .\" by Yuichi SATO .\" .TH USTAT 2 2003\-08\-04 Linux "Linux Programmer's Manual" .SH 名前 ustat \- ファイルシステム (file system) の統計を得る .SH 書式 .nf \fB#include \fP .br \fB#include \fP /* libc[45] */ .br \fB#include \fP /* glibc2 */ .sp \fBint ustat(dev_t \fP\fIdev\fP\fB, struct ustat *\fP\fIubuf\fP\fB);\fP .fi .SH 説明 \fBustat\fP() はマウント (mount) されたファイルシステムの情報を返す。 \fIdev\fP は調べるファイルシステムを含んでいるデバイス (device) の デバイス番号。 \fIubuf\fP は以下のメンバーを含む ustat 構造体へのポインター: .in +4n .nf daddr_t f_tfree; /* Total free blocks */ ino_t f_tinode; /* Number of free inodes */ char f_fname[6]; /* Filsys name */ char f_fpack[6]; /* Filsys pack name */ .fi .in .PP 後の二つのフィールド \fIf_fname\fP と \fIf_fpack\fP は実装されておらず、常にヌルバイト (\(aq\e0\(aq) で埋められる。 .SH 返り値 成功した場合にはゼロが返され、 \fIubuf\fP が指す \fIustat\fP 構造体が埋められる。 エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。 .SH エラー .TP \fBEFAULT\fP \fIubuf\fP がアクセス可能な空間の外側を指している。 .TP \fBEINVAL\fP \fIdev\fP がマウントされたファイルシステムを含むデバイスを参照していない。 .TP \fBENOSYS\fP \fIdev\fP で参照されるマウントされたファイルシステムがこの操作 (operation) を サポートしていないか、Linux のバージョンが 1.3.16 以前である。 .SH 準拠 .\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR .\" but has no ENOSYS condition. SVr4. .SH 注意 \fBustat\fP() は推奨されず、互換性のためだけに提供される。 新しいプログラムは全てこれの代りに \fBstatfs\fP(2) を使用するべきである。 .SS "HP\-UX における注意" .\" Some software tries to use this in order to test whether the .\" underlying filesystem is NFS. HP\-UX 版の構造体 \fIustat\fP には、その他にフィールド \fIf_blksize\fP が存在するが、他では見かけない。 HP\-UX は次のように警告している: ファイルシステムの中には、解放されている inode の数を変更しないものもある。 このようなファイルシステムは、フィールド \fIf_tinode\fP に \-1 を返す。 ファイルシステムの中には、inode を動的に確保するものもある。 このようなファイルシステムは、現在解放されている inode の数を返す。 .SH 関連項目 \fBstat\fP(2), \fBstatfs\fP(2) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。