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