brintos

brintos / linux-shallow public Read only

0
0
Text · 2.8 KiB · 4e8defd Raw
95 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2 3.. _gen_errors:4 5*******************6Generic Error Codes7*******************8 9 10.. _gen-errors:11 12.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|13 14.. flat-table:: Generic error codes15    :header-rows:  016    :stub-columns: 017    :widths: 1 1618 19 20    -  -  ``EAGAIN`` (aka ``EWOULDBLOCK``)21 22       -  The ioctl can't be handled because the device is in state where it23	  can't perform it. This could happen for example in case where24	  device is sleeping and ioctl is performed to query statistics. It25	  is also returned when the ioctl would need to wait for an event,26	  but the device was opened in non-blocking mode.27 28    -  -  ``EBADF``29 30       -  The file descriptor is not a valid.31 32    -  -  ``EBUSY``33 34       -  The ioctl can't be handled because the device is busy. This is35	  typically return while device is streaming, and an ioctl tried to36	  change something that would affect the stream, or would require37	  the usage of a hardware resource that was already allocated. The38	  ioctl must not be retried without performing another action to fix39	  the problem first (typically: stop the stream before retrying).40 41    -  -  ``EFAULT``42 43       -  There was a failure while copying data from/to userspace, probably44	  caused by an invalid pointer reference.45 46    -  -  ``EINVAL``47 48       -  One or more of the ioctl parameters are invalid or out of the49	  allowed range. This is a widely used error code. See the50	  individual ioctl requests for specific causes.51 52    -  -  ``ENODEV``53 54       -  Device not found or was removed.55 56    -  -  ``ENOMEM``57 58       -  There's not enough memory to handle the desired operation.59 60    -  -  ``ENOTTY``61 62       -  The ioctl is not supported by the file descriptor.63 64    -  -  ``ENOSPC``65 66       -  On USB devices, the stream ioctl's can return this error, meaning67	  that this request would overcommit the usb bandwidth reserved for68	  periodic transfers (up to 80% of the USB bandwidth).69 70    -  -  ``EPERM``71 72       -  Permission denied. Can be returned if the device needs write73	  permission, or some special capabilities is needed (e. g. root)74 75    -  -  ``EIO``76 77       -  I/O error. Typically used when there are problems communicating with78          a hardware device. This could indicate broken or flaky hardware.79	  It's a 'Something is wrong, I give up!' type of error.80 81    -  - ``ENXIO``82 83       -  No device corresponding to this device special file exists.84 85 86.. note::87 88  #. This list is not exhaustive; ioctls may return other error codes.89     Since errors may have side effects such as a driver reset,90     applications should abort on unexpected errors, or otherwise91     assume that the device is in a bad state.92 93  #. Request-specific error codes are listed in the individual94     requests descriptions.95