]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu> |
2 | .\" | |
5fbde956 | 3 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
4 | .\" |
5 | .\" Created Wed Aug 9 1995 Thomas K. Dyas <tdyas@eden.rutgers.edu> | |
6 | .\" | |
4c1c5274 | 7 | .TH sysfs 2 (date) "Linux man-pages (unreleased)" |
fea681da | 8 | .SH NAME |
9ee4a2b6 | 9 | sysfs \- get filesystem type information |
fea681da | 10 | .SH SYNOPSIS |
15d65653 | 11 | .nf |
bf6dc682 AC |
12 | .BI "[[deprecated]] int sysfs(int " option ", const char *" fsname ); |
13 | .BI "[[deprecated]] int sysfs(int " option ", unsigned int " fs_index ", char *" buf ); | |
14 | .BI "[[deprecated]] int sysfs(int " option ); | |
15d65653 | 15 | .fi |
fea681da | 16 | .SH DESCRIPTION |
13752de1 MK |
17 | .BR "Note" : |
18 | if you are looking for information about the | |
19 | .B sysfs | |
20 | filesystem that is normally mounted at | |
21 | .IR /sys , | |
22 | see | |
23 | .BR sysfs (5). | |
c6d039a3 | 24 | .P |
4a19240d | 25 | The (obsolete) |
e511ffb6 | 26 | .BR sysfs () |
4a19240d MK |
27 | system call returns information about the filesystem types |
28 | currently present in the kernel. | |
c13182ef | 29 | The specific form of the |
e511ffb6 | 30 | .BR sysfs () |
fea681da MK |
31 | call and the information returned depends on the |
32 | .I option | |
33 | in effect: | |
d1b4e37d | 34 | .TP 3 |
fea681da | 35 | .B 1 |
9ee4a2b6 | 36 | Translate the filesystem identifier string |
fea681da | 37 | .I fsname |
9ee4a2b6 | 38 | into a filesystem type index. |
fea681da MK |
39 | .TP |
40 | .B 2 | |
9ee4a2b6 | 41 | Translate the filesystem type index |
fea681da | 42 | .I fs_index |
9ee4a2b6 | 43 | into a null-terminated filesystem identifier string. |
c13182ef | 44 | This string will |
fea681da MK |
45 | be written to the buffer pointed to by |
46 | .IR buf . | |
47 | Make sure that | |
48 | .I buf | |
49 | has enough space to accept the string. | |
50 | .TP | |
51 | .B 3 | |
9ee4a2b6 | 52 | Return the total number of filesystem types currently present in the |
fea681da | 53 | kernel. |
c6d039a3 | 54 | .P |
9ee4a2b6 | 55 | The numbering of the filesystem type indexes begins with zero. |
47297adb | 56 | .SH RETURN VALUE |
fea681da | 57 | On success, |
e511ffb6 | 58 | .BR sysfs () |
9ee4a2b6 | 59 | returns the filesystem index for option |
fea681da MK |
60 | .BR 1 , |
61 | zero for option | |
62 | .BR 2 , | |
9ee4a2b6 | 63 | and the number of currently configured filesystems for option |
fea681da MK |
64 | .BR 3 . |
65 | On error, \-1 is returned, and | |
66 | .I errno | |
f6a4078b | 67 | is set to indicate the error. |
fea681da MK |
68 | .SH ERRORS |
69 | .TP | |
70 | .B EFAULT | |
71 | .RI "Either " fsname " or " buf | |
72 | is outside your accessible address space. | |
73 | .TP | |
74 | .B EINVAL | |
75 | .I fsname | |
9ee4a2b6 | 76 | is not a valid filesystem type identifier; |
fea681da MK |
77 | .I fs_index |
78 | is out-of-bounds; | |
79 | .I option | |
80 | is invalid. | |
3113c7f3 | 81 | .SH STANDARDS |
4131356c AC |
82 | None. |
83 | .SH HISTORY | |
fea681da | 84 | SVr4. |
c6d039a3 | 85 | .P |
d1d721be MK |
86 | This System-V derived system call is obsolete; don't use it. |
87 | On systems with | |
fea681da | 88 | .IR /proc , |
e8fd5077 | 89 | the same information can be obtained via |
07161ed5 | 90 | .IR /proc ; |
d1d721be | 91 | use that interface instead. |
fea681da MK |
92 | .SH BUGS |
93 | There is no libc or glibc support. | |
94 | There is no way to guess how large \fIbuf\fP should be. | |
b0d3e315 MK |
95 | .SH SEE ALSO |
96 | .BR proc (5), | |
97 | .BR sysfs (5) |