OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 1995-08-09 "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 On Linux with the
158 .\"O .I proc
159 .\"O file system mounted on
160 .\"O .IR /proc ,
161 .\"O the same information can be derived from
162 .\"O .IR /proc/filesystems .
163 Linux ¤Ç¤Ï
164 .I /proc
165 ¤Ë¥Þ¥¦¥ó¥È¤µ¤ì¤ë
166 .I proc
167 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò»È¤Ã¤Æ¡¢
168 .I /proc/filesystems
169 ¤è¤êƱ¤¸¾ðÊó¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
170 .\"O .SH BUGS
171 .SH ¥Ð¥°
172 .\"O There is no libc or glibc support.
173 .\"O There is no way to guess how large \fIbuf\fP should be.
174 libc ¤Þ¤¿¤Ï glibc ¤Î¥µ¥Ý¡¼¥È¤Ï¸ºß¤·¤Ê¤¤¡£
175 \fIbuf\fP ¤ÎÂ礭¤µ¤¬¤É¤ì¤À¤±É¬Íפ«¤ò¿ä¬¤¹¤ëÊýË¡¤¬¤Ê¤¤¡£