fe-read-status.rst 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: DTV.fe
  3. .. _FE_READ_STATUS:
  4. ********************
  5. ioctl FE_READ_STATUS
  6. ********************
  7. Name
  8. ====
  9. FE_READ_STATUS - Returns status information about the front-end. This call only requires - read-only access to the device
  10. Synopsis
  11. ========
  12. .. c:macro:: FE_READ_STATUS
  13. ``int ioctl(int fd, FE_READ_STATUS, unsigned int *status)``
  14. Arguments
  15. =========
  16. ``fd``
  17. File descriptor returned by :c:func:`open()`.
  18. ``status``
  19. pointer to a bitmask integer filled with the values defined by enum
  20. :c:type:`fe_status`.
  21. Description
  22. ===========
  23. All Digital TV frontend devices support the ``FE_READ_STATUS`` ioctl. It is
  24. used to check about the locking status of the frontend after being
  25. tuned. The ioctl takes a pointer to an integer where the status will be
  26. written.
  27. .. note::
  28. The size of status is actually sizeof(enum fe_status), with
  29. varies according with the architecture. This needs to be fixed in the
  30. future.
  31. int fe_status
  32. =============
  33. The fe_status parameter is used to indicate the current state and/or
  34. state changes of the frontend hardware. It is produced using the enum
  35. :c:type:`fe_status` values on a bitmask
  36. Return Value
  37. ============
  38. On success 0 is returned.
  39. On error -1 is returned, and the ``errno`` variable is set
  40. appropriately.
  41. Generic error codes are described at the
  42. :ref:`Generic Error Codes <gen-errors>` chapter.