blob: 862cdff45f3609433a63b01973b1aedd863041b1 [file] [log] [blame]
Markus Heiser5377d912016-06-30 15:18:56 +02001.. -*- coding: utf-8; mode: rst -*-
2
3.. _gen_errors:
4
5*******************
6Generic Error Codes
7*******************
8
9
10.. _gen-errors:
11
12.. flat-table:: Generic error codes
13 :header-rows: 0
14 :stub-columns: 0
15
16
17 - .. row 1
18
19 - EAGAIN (aka EWOULDBLOCK)
20
21 - The ioctl can't be handled because the device is in state where it
22 can't perform it. This could happen for example in case where
23 device is sleeping and ioctl is performed to query statistics. It
24 is also returned when the ioctl would need to wait for an event,
25 but the device was opened in non-blocking mode.
26
27 - .. row 2
28
29 - EBADF
30
31 - The file descriptor is not a valid.
32
33 - .. row 3
34
35 - EBUSY
36
37 - The ioctl can't be handled because the device is busy. This is
38 typically return while device is streaming, and an ioctl tried to
39 change something that would affect the stream, or would require
40 the usage of a hardware resource that was already allocated. The
41 ioctl must not be retried without performing another action to fix
42 the problem first (typically: stop the stream before retrying).
43
44 - .. row 4
45
46 - EFAULT
47
48 - There was a failure while copying data from/to userspace, probably
49 caused by an invalid pointer reference.
50
51 - .. row 5
52
53 - EINVAL
54
55 - One or more of the ioctl parameters are invalid or out of the
56 allowed range. This is a widely used error code. See the
57 individual ioctl requests for specific causes.
58
59 - .. row 6
60
61 - ENODEV
62
63 - Device not found or was removed.
64
65 - .. row 7
66
67 - ENOMEM
68
69 - There's not enough memory to handle the desired operation.
70
71 - .. row 8
72
73 - ENOTTY
74
75 - The ioctl is not supported by the driver, actually meaning that
76 the required functionality is not available, or the file
77 descriptor is not for a media device.
78
79 - .. row 9
80
81 - ENOSPC
82
83 - On USB devices, the stream ioctl's can return this error, meaning
84 that this request would overcommit the usb bandwidth reserved for
85 periodic transfers (up to 80% of the USB bandwidth).
86
87 - .. row 10
88
89 - EPERM
90
91 - Permission denied. Can be returned if the device needs write
92 permission, or some special capabilities is needed (e. g. root)
93
94
95Note 1: ioctls may return other error codes. Since errors may have side
96effects such as a driver reset, applications should abort on unexpected
97errors.
98
99Note 2: Request-specific error codes are listed in the individual
100requests descriptions.
101
102
103.. ------------------------------------------------------------------------------
104.. This file was automatically converted from DocBook-XML with the dbxml
105.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
106.. from the linux kernel, refer to:
107..
108.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
109.. ------------------------------------------------------------------------------