OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man2 / sysfs.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   Wed Aug  9 1995     Thomas K. Dyas <tdyas@eden.rutgers.edu>
24 .\"
25 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .TH SYSFS 2 2010\-06\-27 Linux "Linux Programmer's Manual"
31 .SH 名前
32 sysfs \- ファイルシステム (file system) の情報を取得する
33 .SH 書式
34 \fBint sysfs(int \fP\fIoption\fP\fB, const char *\fP\fIfsname\fP\fB);\fP
35
36 \fBint sysfs(int \fP\fIoption\fP\fB, unsigned int \fP\fIfs_index\fP\fB, char
37 *\fP\fIbuf\fP\fB);\fP
38
39 \fBint sysfs(int \fP\fIoption\fP\fB);\fP
40 .SH 説明
41 \fBsysfs\fP()  は現在カーネル (kernel) に存在しているファイルシステムの型 (type) 情報を返す。 それぞれの
42 \fBsysfs\fP()  コールの形式と返される情報は \fIoption\fP に依存しており、それは:
43 .TP  3
44 \fB1\fP
45 ファイルシステム識別文字列 (identifier string)  \fIfsname\fP をファイルシステムの型インデックス (type index)
46 に翻訳する。
47 .TP 
48 \fB2\fP
49 ファイルシステムの型インデックス \fIfs_index\fP を NULL 終端されたファイルシステム識別文字列に翻訳する。 この文字列は \fIbuf\fP
50 で指定されたバッファーへ書き込まれる。 \fIbuf\fP に文字列を入れるだけの十分な容量があることを確かめること。
51 .TP 
52 \fB3\fP
53 現在カーネルに存在するファイルシステム型の数の合計を返す。
54 .PP
55 ファイルシステムの型インデックスの数はゼロから始まる。
56 .SH 返り値
57 成功した場合 \fBsysfs\fP()  は、 オプション \fB1\fP では ファイルシステムのインデックスを返す。 オプション \fB2\fP ではゼロを返す。
58 オプション \fB3\fP は現在設定されているファイルシステムの数を返す。 エラーの場合は、\-1 が返され、 \fIerrno\fP が適切に設定される。
59 .SH エラー
60 .TP 
61 \fBEFAULT\fP
62 fsname\fI と \fPbuf のどちらかがアクセス可能なアドレス空間の外にある。
63 .TP 
64 \fBEINVAL\fP
65 \fIfsname\fP が正しいファイルシステムの型識別子ではない; \fIfs_index\fP が範囲の外にある; \fIoption\fP が正しくない。
66 .SH 準拠
67 SVr4.
68 .SH 注意
69 この System\-V 由来のシステムコールは廃止予定 (obsolete) であり、 使用しないこと。 \fI/proc\fP
70 が利用できるシステムでは、同じ情報が \fI/proc/filesystems\fP 経由で取得でき、このインタフェースを使用すること。
71 .SH バグ
72 libc または glibc のサポートは存在しない。 \fIbuf\fP の大きさがどれだけ必要かを推測する方法がない。