]>
Commit | Line | Data |
---|---|---|
ae03abcf TW |
1 | //po4a: entry man manual |
2 | = enosys(1) | |
3 | :doctype: manpage | |
4 | :man manual: User Commands | |
5 | :man source: util-linux {release-version} | |
6 | :page-layout: base | |
7 | :command: enosys | |
8 | ||
9 | == NAME | |
10 | ||
610b26ed | 11 | enosys - utility to make syscalls fail with ENOSYS |
ae03abcf TW |
12 | |
13 | == SYNOPSIS | |
14 | ||
15 | *enosys* [*--syscall*|*-s* _syscall_] command | |
16 | ||
17 | == DESCRIPTION | |
18 | ||
19 | *enosys* is a simple command to execute a child process for which certain | |
20 | syscalls fail with errno ENOSYS. | |
21 | ||
22 | It can be used to test the behavior of applications in the face of missing | |
23 | syscalls as would happen when running on old kernels. | |
24 | ||
25 | == OPTIONS | |
26 | ||
27 | *-s*, *--syscall*:: | |
ced129dc TW |
28 | Syscall to block with *ENOSYS*. Can be specified multiple times. |
29 | An alternative error number or name can be specified with a colon. | |
ae03abcf | 30 | |
65bf3c73 | 31 | *-i*, *--ioctl*:: |
ced129dc TW |
32 | Ioctl to block with *ENOTTY*. Can be specified multiple times. |
33 | An alternative error number or name can be specified with a colon. | |
65bf3c73 | 34 | |
7f104027 TW |
35 | *-l*, *--list*:: |
36 | List syscalls known to *enosys*. | |
37 | ||
65bf3c73 TW |
38 | *-m*, *--list-ioctl*:: |
39 | List ioctls known to *enosys*. | |
40 | ||
90cb3825 | 41 | *-d*, *--dump*[=_file_]:: |
e6e606a9 TW |
42 | Dump seccomp bytecode filter to standard output. |
43 | + | |
44 | The dump can for example be used by *setpriv --seccomp-filter*. | |
45 | ||
ae03abcf TW |
46 | include::man-common/help-version.adoc[] |
47 | ||
ced129dc TW |
48 | == EXAMPLES |
49 | ||
50 | # fail syscall "fallocate" with ENOSYS | |
51 | enosys -s fallocate ... | |
52 | ||
53 | # fail syscall "fallocate" with ENOMEM | |
54 | enosys -s fallocate:ENOMEM ... | |
55 | ||
56 | # fail syscall "fallocate" with value 12/ENOMEM | |
57 | enosys -s fallocate:12 ... | |
58 | ||
59 | # fail ioctl FIOCLEX with ENOTTY | |
60 | enosys -i FIOCLEX ... | |
61 | ||
62 | # fail ioctl FIOCLEX with ENOMEM | |
63 | enosys -i FIOCLEX:ENOMEM ... | |
64 | ||
65 | # fail ioctl FIOCLEX with value 12/ENOMEM | |
66 | enosys -i FIOCLEX:12 ... | |
67 | ||
ae03abcf TW |
68 | == EXIT STATUS |
69 | ||
70 | *enosys* exits with the status code of the executed process. | |
71 | The following values have special meanings: | |
72 | ||
73 | *1*:: | |
74 | internal error | |
75 | ||
76 | *2*:: | |
77 | system does not provide the necessary functionality | |
78 | ||
79 | == AUTHORS | |
80 | ||
81 | mailto:thomas@t-8ch.de[Thomas Weißschuh] | |
82 | ||
83 | == SEE ALSO | |
84 | ||
85 | *syscall*(2) | |
86 | ||
87 | include::man-common/bugreports.adoc[] | |
88 | ||
89 | include::man-common/footer.adoc[] | |
90 | ||
91 | ifdef::translation[] | |
92 | include::man-common/translation.adoc[] | |
93 | endif::[] |