1SYSFS(2) Linux Programmer's Manual SYSFS(2)
2
3
4
6 sysfs - get file system type information
7
9 int sysfs(int option, const char *fsname);
10
11 int sysfs(int option, unsigned int fs_index, char *buf);
12
13 int sysfs(int option);
14
16 sysfs() returns information about the file system types currently
17 present in the kernel. The specific form of the sysfs() call and the
18 information returned depends on the option in effect:
19
20 1 Translate the file-system identifier string fsname into a file-sys‐
21 tem type index.
22
23 2 Translate the file-system type index fs_index into a null-terminated
24 file-system identifier string. This string will be written to the
25 buffer pointed to by buf. Make sure that buf has enough space to
26 accept the string.
27
28 3 Return the total number of file system types currently present in
29 the kernel.
30
31 The numbering of the file-system type indexes begins with zero.
32
34 On success, sysfs() returns the file-system index for option 1, zero
35 for option 2, and the number of currently configured file systems for
36 option 3. On error, -1 is returned, and errno is set appropriately.
37
39 EFAULT Either fsname or buf is outside your accessible address space.
40
41 EINVAL fsname is not a valid file-system type identifier; fs_index is
42 out-of-bounds; option is invalid.
43
45 SVr4.
46
48 On Linux with the proc file system mounted on /proc, the same informa‐
49 tion can be derived from /proc/filesystems.
50
52 There is no libc or glibc support. There is no way to guess how large
53 buf should be.
54
56 This page is part of release 3.22 of the Linux man-pages project. A
57 description of the project, and information about reporting bugs, can
58 be found at http://www.kernel.org/doc/man-pages/.
59
60
61
62Linux 1995-08-09 SYSFS(2)