cec-func-close.rst 725 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: CEC
  3. .. _cec-func-close:
  4. ***********
  5. cec close()
  6. ***********
  7. Name
  8. ====
  9. cec-close - Close a cec device
  10. Synopsis
  11. ========
  12. .. code-block:: c
  13. #include <unistd.h>
  14. .. c:function:: int close( int fd )
  15. Arguments
  16. =========
  17. ``fd``
  18. File descriptor returned by :c:func:`open()`.
  19. Description
  20. ===========
  21. Closes the cec device. Resources associated with the file descriptor are
  22. freed. The device configuration remain unchanged.
  23. Return Value
  24. ============
  25. :c:func:`close()` returns 0 on success. On error, -1 is returned, and
  26. ``errno`` is set appropriately. Possible error codes are:
  27. ``EBADF``
  28. ``fd`` is not a valid open file descriptor.