1SYSFS(2) Linux Programmer's Manual SYSFS(2)
2
3
4
6 sysfs - get filesystem 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 Note: if you are looking for information about the sysfs filesystem
17 that is normally mounted at /sys, see sysfs(5).
18
19 The (obsolete) sysfs() system call returns information about the
20 filesystem types currently present in the kernel. The specific form of
21 the sysfs() call and the information returned depends on the option in
22 effect:
23
24 1 Translate the filesystem identifier string fsname into a filesystem
25 type index.
26
27 2 Translate the filesystem type index fs_index into a null-terminated
28 filesystem identifier string. This string will be written to the
29 buffer pointed to by buf. Make sure that buf has enough space to
30 accept the string.
31
32 3 Return the total number of filesystem types currently present in the
33 kernel.
34
35 The numbering of the filesystem type indexes begins with zero.
36
38 On success, sysfs() returns the filesystem index for option 1, zero for
39 option 2, and the number of currently configured filesystems for option
40 3. On error, -1 is returned, and errno is set appropriately.
41
43 EFAULT Either fsname or buf is outside your accessible address space.
44
45 EINVAL fsname is not a valid filesystem type identifier; fs_index is
46 out-of-bounds; option is invalid.
47
49 SVr4.
50
52 This System-V derived system call is obsolete; don't use it. On sys‐
53 tems with /proc, the same information can be obtained via
54 /proc/filesystems; use that interface instead.
55
57 There is no libc or glibc support. There is no way to guess how large
58 buf should be.
59
61 This page is part of release 5.02 of the Linux man-pages project. A
62 description of the project, information about reporting bugs, and the
63 latest version of this page, can be found at
64 https://www.kernel.org/doc/man-pages/.
65
66
67
68Linux 2017-09-15 SYSFS(2)