cec-func-close.rst 861 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _cec-func-close:
  3. ***********
  4. cec close()
  5. ***********
  6. Name
  7. ====
  8. cec-close - Close a cec device
  9. Synopsis
  10. ========
  11. .. code-block:: c
  12. #include <unistd.h>
  13. .. c:function:: int close( int fd )
  14. :name: cec-close
  15. Arguments
  16. =========
  17. ``fd``
  18. File descriptor returned by :c:func:`open() <cec-open>`.
  19. Description
  20. ===========
  21. .. note::
  22. This documents the proposed CEC API. This API is not yet finalized
  23. and is currently only available as a staging kernel module.
  24. Closes the cec device. Resources associated with the file descriptor are
  25. freed. The device configuration remain unchanged.
  26. Return Value
  27. ============
  28. :c:func:`close()` returns 0 on success. On error, -1 is returned, and
  29. ``errno`` is set appropriately. Possible error codes are:
  30. ``EBADF``
  31. ``fd`` is not a valid open file descriptor.