1sysfs(2)                      System Calls Manual                     sysfs(2)
2
3
4

NAME

6       sysfs - get filesystem type information
7

SYNOPSIS

9       [[deprecated]] int sysfs(int option, const char *fsname);
10       [[deprecated]] int sysfs(int option, unsigned int fs_index, char *buf);
11       [[deprecated]] 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

STANDARDS

47       None.
48

HISTORY

50       SVr4.
51
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  /proc;  use
54       that interface instead.
55

BUGS

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

SEE ALSO

61       proc(5), sysfs(5)
62
63
64
65Linux man-pages 6.05              2023-03-30                          sysfs(2)
Impressum