Seth Woolley's Man Viewer

sysfs(2) - sysfs, sysfs - get file system type information - man 2 sysfs

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

SYSFS(2)                   Linux Programmer's Manual                  SYSFS(2)

       sysfs - get file(1,n) system type information

       int sysfs(int option, const char *fsname);

       int sysfs(int option, unsigned int fs_index, char *buf);

       int sysfs(int option);

       sysfs returns information about the file(1,n) system types currently present
       in(1,8) the kernel. The specific form of the sysfs call and the  information
       returned depends on the option in(1,8) effect:

       1      Translate  the file-system identifier string(3,n) fsname into a file-
              system type index.

       2      Translate the file-system type index fs_index into a  NUL-termi-
              nated file-system identifier string. This string(3,n) will be written
              to the buffer pointed to by buf.  Make sure that buf has  enough
              space to accept(2,8) the string.

       3      Return  the  total number of file(1,n) system types currently present
              in(1,8) the kernel.

       The numbering of the file-system type indexes begins with zero.

       On success, sysfs returns the file-system index for option 1, zero  for
       option  2,  and  the  number  of  currently configured file(1,n) systems for
       option 3.  On error(8,n), -1 is returned, and errno is set(7,n,1 builtins) appropriately.

       EFAULT Either fsname or buf is outside your accessible address space.

       EINVAL fsname is not a valid file-system type identifier;  fs_index  is
              out-of-bounds; option is invalid.


       On  Linux  with the proc(5,n) filesystem mounted on /proc(5,n), the same informa-
       tion can be derived from /proc(5,n)/filesystems.

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

Linux 1.3.16                      1995-08-09                          SYSFS(2)

References for this manual (incoming links)