OSDN Git Service

729c2c24c901adf24964bbcb973511bfe1dbca76
[linuxjm/LDP_man-pages.git] / draft / 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 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
26 .\"         all rights reserved.
27 .\" Translated Tue Mar  4 00:03:08 JST 1997
28 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
29 .\" Updated & Modified Sat Jun  2 20:46:34 JST 2001
30 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
31 .\"
32 .\"WORD:        file system             ファイル・システム
33 .\"WORD:        kernel                  カーネル
34 .\"WORD:        identifier string       識別文字列
35 .\"WORD:        type index              型インデックス
36 .\"
37 .TH SYSFS 2 2010-06-27 "Linux" "Linux Programmer's Manual"
38 .\"O .SH NAME
39 .SH 名前
40 .\"O sysfs \- get file system type information
41 sysfs \- ファイル・システム (file system) の情報を取得する
42 .\"O .SH SYNOPSIS
43 .SH 書式
44 .BI "int sysfs(int " option ", const char *" fsname );
45
46 .BI "int sysfs(int " option ", unsigned int " fs_index ", char *" buf );
47
48 .BI "int sysfs(int " option );
49 .\"O .SH DESCRIPTION
50 .SH 説明
51 .\"O .BR sysfs ()
52 .\"O returns information about the file system types currently present in
53 .\"O the kernel.
54 .\"O The specific form of the
55 .\"O .BR sysfs ()
56 .\"O call and the information returned depends on the
57 .\"O .I option
58 .\"O in effect:
59 .BR sysfs ()
60 は現在カーネル (kernel) に存在しているファイル・システムの型 (type) 情報を返す。
61 それぞれの
62 .BR sysfs ()
63 コールの形式と返される情報は
64 .I option
65 に依存しており、それは:
66 .TP 3
67 .B 1
68 .\"O Translate the file-system identifier string
69 .\"O .I fsname
70 .\"O into a file-system type index.
71 ファイル・システム識別文字列 (identifier string)
72 .I fsname
73 をファイル・システムの型インデックス (type index) に翻訳する。
74 .TP
75 .B 2
76 .\"O Translate the file-system type index
77 .\"O .I fs_index
78 .\"O into a null-terminated file-system identifier string.
79 .\"O This string will
80 .\"O be written to the buffer pointed to by
81 .\"O .IR buf .
82 .\"O Make sure that
83 .\"O .I buf
84 .\"O has enough space to accept the string.
85 ファイル・システムの型インデックス
86 .I fs_index
87 を NULL 終端されたファイル・システム識別文字列に翻訳する。
88 この文字列は
89 .I buf
90 で指定されたバッファーへ書き込まれる。
91 .I buf
92 に文字列を入れるだけの十分な容量があることを確かめること。
93 .TP
94 .B 3
95 .\"O Return the total number of file system types currently present in the
96 .\"O kernel.
97 現在カーネルに存在するファイル・システム型の数の合計を返す。
98 .PP
99 .\"O The numbering of the file-system type indexes begins with zero.
100 ファイル・システムの型インデックスの数はゼロから始まる。
101 .\"O .SH "RETURN VALUE"
102 .SH 返り値
103 .\"O On success,
104 .\"O .BR sysfs ()
105 .\"O returns the file-system index for option
106 .\"O .BR 1 ,
107 .\"O zero for option
108 .\"O .BR 2 ,
109 .\"O and the number of currently configured file systems for option
110 .\"O .BR 3 .
111 成功した場合
112 .BR sysfs ()
113 は、
114 オプション
115 .B 1
116 では
117 ファイル・システムのインデックスを返す。
118 オプション
119 .B 2
120 ではゼロを返す。
121 オプション
122 .B 3
123 は現在設定されているファイル・システムの数を返す。
124 .\"O On error, \-1 is returned, and
125 .\"O .I errno
126 .\"O is set appropriately.
127 エラーの場合は、\-1 が返され、
128 .I errno
129 が適切に設定される。
130 .\"O .SH ERRORS
131 .SH エラー
132 .TP
133 .B EFAULT
134 .\"O .RI "Either " fsname " or " buf
135 .\"O is outside your accessible address space.
136 .RI  fsname " と " buf
137 のどちらかがアクセス可能なアドレス空間の外にある。
138 .TP
139 .B EINVAL
140 .\"O .I fsname
141 .\"O is not a valid file-system type identifier;
142 .\"O .I fs_index
143 .\"O is out-of-bounds;
144 .\"O .I option
145 .\"O is invalid.
146 .I fsname
147 が正しいファイル・システムの型識別子ではない;
148 .I fs_index
149 が範囲の外にある;
150 .I option
151 が正しくない。
152 .\"O .SH "CONFORMING TO"
153 .SH 準拠
154 SVr4.
155 .\"O .SH NOTES
156 .SH 注意
157 .\"O This System-V derived system call is obsolete; don't use it.
158 .\"O On systems with
159 .\"O .IR /proc ,
160 .\"O the same information can be obtained via
161 .\"O .IR /proc/filesystems ;
162 .\"O use that interface instead.
163 この System-V 由来のシステムコールは廃止予定 (obsolete) であり、
164 使用しないこと。
165 .I /proc
166 が利用できるシステムでは、同じ情報が
167 .I /proc/filesystems
168 経由で取得でき、このインタフェースを使用すること。
169 .\"O .SH BUGS
170 .SH バグ
171 .\"O There is no libc or glibc support.
172 .\"O There is no way to guess how large \fIbuf\fP should be.
173 libc または glibc のサポートは存在しない。
174 \fIbuf\fP の大きさがどれだけ必要かを推測する方法がない。