gen-errors.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <title>Generic Error Codes</title>
  2. <table frame="none" pgwide="1" id="gen-errors">
  3. <title>Generic error codes</title>
  4. <tgroup cols="2">
  5. &cs-str;
  6. <tbody valign="top">
  7. <!-- Keep it ordered alphabetically -->
  8. <row>
  9. <entry>EBADF</entry>
  10. <entry>The file descriptor is not a valid.</entry>
  11. </row>
  12. <row>
  13. <entry>EBUSY</entry>
  14. <entry>The ioctl can't be handled because the device is busy. This is
  15. typically return while device is streaming, and an ioctl tried to
  16. change something that would affect the stream, or would require the
  17. usage of a hardware resource that was already allocated. The ioctl
  18. must not be retried without performing another action to fix the
  19. problem first (typically: stop the stream before retrying).</entry>
  20. </row>
  21. <row>
  22. <entry>EFAULT</entry>
  23. <entry>There was a failure while copying data from/to userspace,
  24. probably caused by an invalid pointer reference.</entry>
  25. </row>
  26. <row>
  27. <entry>EINVAL</entry>
  28. <entry>One or more of the ioctl parameters are invalid or out of the
  29. allowed range. This is a widely used error code. See the individual
  30. ioctl requests for specific causes.</entry>
  31. </row>
  32. <row>
  33. <entry>ENODEV</entry>
  34. <entry>Device not found or was removed.</entry>
  35. </row>
  36. <row>
  37. <entry>ENOMEM</entry>
  38. <entry>There's not enough memory to handle the desired operation.</entry>
  39. </row>
  40. <row>
  41. <entry>ENOTTY</entry>
  42. <entry>The ioctl is not supported by the driver, actually meaning that
  43. the required functionality is not available, or the file
  44. descriptor is not for a media device.</entry>
  45. </row>
  46. <row>
  47. <entry>ENOSPC</entry>
  48. <entry>On USB devices, the stream ioctl's can return this error, meaning
  49. that this request would overcommit the usb bandwidth reserved
  50. for periodic transfers (up to 80% of the USB bandwidth).</entry>
  51. </row>
  52. <row>
  53. <entry>ENOSYS or EOPNOTSUPP</entry>
  54. <entry>Function not available for this device (dvb API only. Will likely
  55. be replaced anytime soon by ENOTTY).</entry>
  56. </row>
  57. <row>
  58. <entry>EPERM</entry>
  59. <entry>Permission denied. Can be returned if the device needs write
  60. permission, or some special capabilities is needed
  61. (e. g. root)</entry>
  62. </row>
  63. <row>
  64. <entry>EWOULDBLOCK</entry>
  65. <entry>Operation would block. Used when the ioctl would need to wait
  66. for an event, but the device was opened in non-blocking mode.</entry>
  67. </row>
  68. </tbody>
  69. </tgroup>
  70. </table>
  71. <para>Note 1: ioctls may return other error codes. Since errors may have side
  72. effects such as a driver reset, applications should abort on unexpected errors.
  73. </para>
  74. <para>Note 2: Request-specific error codes are listed in the individual
  75. requests descriptions.</para>