.\" 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 Wed Aug 9 1995 Thomas K. Dyas .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya .\" all rights reserved. .\" Translated Tue Mar 4 00:03:08 JST 1997 .\" by HANATAKA Shinya .\" Updated & Modified Sat Jun 2 20:46:34 JST 2001 .\" by Yuichi SATO .\" .TH SYSFS 2 2010\-06\-27 Linux "Linux Programmer's Manual" .SH 名前 sysfs \- ファイルシステム (file system) の情報を取得する .SH 書式 \fBint sysfs(int \fP\fIoption\fP\fB, const char *\fP\fIfsname\fP\fB);\fP \fBint sysfs(int \fP\fIoption\fP\fB, unsigned int \fP\fIfs_index\fP\fB, char *\fP\fIbuf\fP\fB);\fP \fBint sysfs(int \fP\fIoption\fP\fB);\fP .SH 説明 \fBsysfs\fP() は現在カーネル (kernel) に存在しているファイルシステムの型 (type) 情報を返す。 それぞれの \fBsysfs\fP() コールの形式と返される情報は \fIoption\fP に依存しており、それは: .TP 3 \fB1\fP ファイルシステム識別文字列 (identifier string) \fIfsname\fP をファイルシステムの型インデックス (type index) に翻訳する。 .TP \fB2\fP ファイルシステムの型インデックス \fIfs_index\fP をヌル終端されたファイルシステム識別文字列に翻訳する。 この文字列は \fIbuf\fP で指定されたバッファーへ書き込まれる。 \fIbuf\fP に文字列を入れるだけの十分な容量があることを確かめること。 .TP \fB3\fP 現在カーネルに存在するファイルシステム型の数の合計を返す。 .PP ファイルシステムの型インデックスの数はゼロから始まる。 .SH 返り値 成功した場合 \fBsysfs\fP() は、 オプション \fB1\fP では ファイルシステムのインデックスを返す。 オプション \fB2\fP ではゼロを返す。 オプション \fB3\fP は現在設定されているファイルシステムの数を返す。 エラーの場合は、\-1 が返され、 \fIerrno\fP が適切に設定される。 .SH エラー .TP \fBEFAULT\fP fsname\fI と \fPbuf のどちらかがアクセス可能なアドレス空間の外にある。 .TP \fBEINVAL\fP \fIfsname\fP が正しいファイルシステムの型識別子ではない; \fIfs_index\fP が範囲の外にある; \fIoption\fP が正しくない。 .SH 準拠 SVr4. .SH 注意 この System\-V 由来のシステムコールは廃止予定 (obsolete) であり、 使用しないこと。 \fI/proc\fP が利用できるシステムでは、同じ情報が \fI/proc/filesystems\fP 経由で取得でき、このインターフェースを使用すること。 .SH バグ libc または glibc のサポートは存在しない。 \fIbuf\fP の大きさがどれだけ必要かを推測する方法がない。 .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。