Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: CEC
0003 
0004 .. _cec-func-close:
0005 
0006 ***********
0007 cec close()
0008 ***********
0009 
0010 Name
0011 ====
0012 
0013 cec-close - Close a cec device
0014 
0015 Synopsis
0016 ========
0017 
0018 .. code-block:: c
0019 
0020     #include <unistd.h>
0021 
0022 .. c:function:: int close( int fd )
0023 
0024 Arguments
0025 =========
0026 
0027 ``fd``
0028     File descriptor returned by :c:func:`open()`.
0029 
0030 Description
0031 ===========
0032 
0033 Closes the cec device. Resources associated with the file descriptor are
0034 freed. The device configuration remain unchanged.
0035 
0036 Return Value
0037 ============
0038 
0039 :c:func:`close()` returns 0 on success. On error, -1 is returned, and
0040 ``errno`` is set appropriately. Possible error codes are:
0041 
0042 ``EBADF``
0043     ``fd`` is not a valid open file descriptor.