1SYSFS(2)                   Linux Programmer's Manual                  SYSFS(2)
2
3
4

NAME

6       sysfs - get filesystem type information
7

SYNOPSIS

9       int sysfs(int option, const char *fsname);
10       int sysfs(int option, unsigned int fs_index, char *buf);
11       int sysfs(int option);
12

DESCRIPTION

14       Note:  if  you  are  looking for information about the sysfs filesystem
15       that is normally mounted at /sys, see sysfs(5).
16
17       The (obsolete)  sysfs()  system  call  returns  information  about  the
18       filesystem types currently present in the kernel.  The specific form of
19       the sysfs() call and the information returned depends on the option  in
20       effect:
21
22       1  Translate  the filesystem identifier string fsname into a filesystem
23          type index.
24
25       2  Translate the filesystem type index fs_index into a  null-terminated
26          filesystem  identifier  string.   This string will be written to the
27          buffer pointed to by buf.  Make sure that buf has  enough  space  to
28          accept the string.
29
30       3  Return the total number of filesystem types currently present in the
31          kernel.
32
33       The numbering of the filesystem type indexes begins with zero.
34

RETURN VALUE

36       On success, sysfs() returns the filesystem index for option 1, zero for
37       option 2, and the number of currently configured filesystems for option
38       3.  On error, -1 is returned, and errno is set to indicate the error.
39

ERRORS

41       EFAULT Either fsname or buf is outside your accessible address space.
42
43       EINVAL fsname is not a valid filesystem type  identifier;  fs_index  is
44              out-of-bounds; option is invalid.
45

CONFORMING TO

47       SVr4.
48

NOTES

50       This  System-V  derived system call is obsolete; don't use it.  On sys‐
51       tems with /proc, the same information can be obtained  via  /proc;  use
52       that interface instead.
53

BUGS

55       There  is no libc or glibc support.  There is no way to guess how large
56       buf should be.
57

SEE ALSO

59       proc(5), sysfs(5)
60

COLOPHON

62       This page is part of release 5.13 of the Linux  man-pages  project.   A
63       description  of  the project, information about reporting bugs, and the
64       latest    version    of    this    page,    can     be     found     at
65       https://www.kernel.org/doc/man-pages/.
66
67
68
69Linux                             2021-03-22                          SYSFS(2)
Impressum