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

NAME

6       sysfs - get file system type information
7

SYNOPSIS

9       #include <sys/fstyp.h>
10       #include <sys/fsid.h>
11
12       int sysfs(int opcode, const char *fsname);
13
14
15       int sysfs(int opcode, int fs_index, char *buf);
16
17
18       int sysfs(int opcode);
19
20

DESCRIPTION

22       The  sysfs()  function  returns information about the file system types
23       configured  in the system.  The number of arguments accepted by sysfs()
24       depends on the opcode argument, which can take the following values:
25
26       GETFSIND     Translate fsname, a null-terminated file-system type iden‐
27                    tifier, into a file-system type index.
28
29
30       GETFSTYP     Translate fs_index, a file-system type index, into a null-
31                    terminated  file-system  type identifier and write it into
32                    the buffer pointed to by buf, which must be  at  least  of
33                    size FSTYPSZ as defined in <sys/fstyp.h>.
34
35
36       GETNFSTYP    Return the total number of file system types configured in
37                    the system.
38
39

RETURN VALUES

41       Upon successful completion, the value returned depends upon the  opcode
42       argument as follows:
43
44       GETFSIND     the file-system type index
45
46
47       GETFSTYP     0
48
49
50       GETNFSTYP    the number of file system types configured
51
52
53
54       Otherwise, −1 is returned  and errno is set to indicate the error.
55

ERRORS

57       The sysfs() function will fail if:
58
59       EFAULT    The buf or fsname argument points to an illegal address.
60
61
62       EINVAL    The  fsname argument points to an invalid file-system identi‐
63                 fier; the fs_index argument is 0 or invalid;  or  the  opcode
64                 argument is invalid.
65
66
67
68
69SunOS 5.11                        5 Jul 1990                          sysfs(2)
Impressum