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 This System-V derived system call is obsolete; don't use it. On sys‐
49 tems with /proc, the same information can be obtained via
50 /proc/filesystems; use that interface instead.
51
53 There is no libc or glibc support. There is no way to guess how large
54 buf should be.
55
57 This page is part of release 3.53 of the Linux man-pages project. A
58 description of the project, and information about reporting bugs, can
59 be found at http://www.kernel.org/doc/man-pages/.
60
61
62
63Linux 2010-06-27 SYSFS(2)