.\" Copyright (C) 1995, Thomas K. Dyas .\" .\" 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. .\" .\" 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 .\" .\" 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 .\" .\"WORD: file system ファイル・システム .\"WORD: mount マウント .\"WORD: device デバイス .\"WORD: member メンバー .\"WORD: NUL character ヌル文字 .\"WORD: implement 実装 .\"WORD: pointer ポインター .\" .TH USTAT 2 2003-08-04 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O ustat \- get file system statistics ustat \- ファイル・システム (file system) の統計を得る .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .br .BR "#include " " /* libc[45] */" .br .BR "#include " " /* glibc2 */" .sp .BI "int ustat(dev_t " dev ", struct ustat *" ubuf ); .fi .\"O .SH DESCRIPTION .SH 説明 .\"O .BR ustat () .\"O returns information about a mounted file system. .\"O .I dev .\"O is a device number identifying a device containing .\"O a mounted file system. .BR ustat () はマウント (mount) されたファイル・システムの情報を返す。 .I dev は調べるファイル・システムを含んでいるデバイス (device) の デバイス番号。 .\"O .I ubuf .\"O is a pointer to a \fIustat\fP structure that contains the following .\"O members: .I ubuf は以下のメンバーを含む 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 .\"O The last two fields, .\"O .I f_fname .\"O and .\"O .IR f_fpack , .\"O are not implemented and will .\"O always be filled with null bytes (\(aq\\0\(aq). 後の二つのフィールド .I f_fname と .I f_fpack は実装されておらず、常に NULL バイト (\(aq\\0\(aq) で埋められる。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O On success, zero is returned and the .\"O .I ustat .\"O structure pointed to by .\"O .I ubuf .\"O will be filled in. .\"O On error, \-1 is returned, and .\"O .I errno .\"O is set appropriately. 成功した場合にはゼロが返され、 .I ubuf が指す .I ustat 構造体が埋められる。 エラーの場合は \-1 が返され、 .I errno が適切に設定される。 .\"O .SH ERRORS .SH エラー .TP .B EFAULT .\"O .I ubuf .\"O points outside of your accessible address space. .I ubuf がアクセス可能な空間の外側を指している。 .TP .B EINVAL .\"O .I dev .\"O does not refer to a device containing a mounted file system. .I dev がマウントされたファイル・システムを含むデバイスを参照していない。 .TP .B ENOSYS .\"O The mounted file system referenced by .\"O .I dev .\"O does not support this operation, or any version of Linux before .\"O 1.3.16. .I dev で参照されるマウントされたファイル・システムがこの操作 (operation) を サポートしていないか、Linux のバージョンが 1.3.16 以前である。 .\"O .SH "CONFORMING TO" .SH 準拠 SVr4. .\"O .\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR .\"O .\" but has no ENOSYS condition. .\" SVr4 には他に ENOLINK, ECOMM, EINTR についての記述があるが、 .\" ENOSYS エラーについての記述はない。 .\"O .SH NOTES .SH 注意 .\"O .BR ustat () .\"O is deprecated and has only been provided for compatibility. .BR ustat () は推奨されず、互換性のためだけに提供される。 .\"O All new programs should use .\"O .BR statfs (2) .\"O instead. 新しいプログラムは全てこれの代りに .BR statfs (2) を使用するべきである。 .\"O .SS "HP-UX Notes" .SS "HP-UX における注意" .\"O The HP-UX version of the .\"O .I ustat .\"O structure has an additional field, .\"O .I f_blksize .\"O that is unknown elsewhere. .\"O HP-UX warns: .\"O For some file systems, the number of free inodes does not change. .\"O Such file systems will return \-1 in the field .\"O .IR f_tinode . HP-UX 版の構造体 .I ustat には、その他にフィールド .I f_blksize が存在するが、他では見かけない。 HP-UX は次のように警告している: ファイルシステムの中には、解放されている inode の数を変更しないものもある。 このようなファイルシステムは、フィールド .I f_tinode に \-1 を返す。 .\"O .\" Some software tries to use this in order to test whether the .\"O .\" underlying file system is NFS. .\" ファイルシステムが NFS であるか否かをテストするために .\" これを使用するソフトウェアもある。 .\"O For some file systems, inodes are dynamically allocated. .\"O Such file systems will return the current number of free inodes. ファイルシステムの中には、inode を動的に確保するものもある。 このようなファイルシステムは、現在解放されている inode の数を返す。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR stat (2), .BR statfs (2)