cec-func-close.rst 716 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. 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.