2020-08-26 15:03:09 +08:00
|
|
|
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
|
2020-09-24 14:15:55 +08:00
|
|
|
.. c:namespace:: CEC
|
2018-08-30 22:15:26 +08:00
|
|
|
|
2016-07-09 02:55:42 +08:00
|
|
|
.. _cec-func-close:
|
|
|
|
|
|
|
|
***********
|
|
|
|
cec close()
|
|
|
|
***********
|
|
|
|
|
2016-07-09 02:55:43 +08:00
|
|
|
Name
|
|
|
|
====
|
2016-07-09 02:55:42 +08:00
|
|
|
|
2016-07-09 02:55:43 +08:00
|
|
|
cec-close - Close a cec device
|
2016-07-09 02:55:42 +08:00
|
|
|
|
|
|
|
Synopsis
|
|
|
|
========
|
|
|
|
|
|
|
|
.. code-block:: c
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2016-08-19 23:00:43 +08:00
|
|
|
.. c:function:: int close( int fd )
|
2016-07-09 02:55:42 +08:00
|
|
|
|
|
|
|
Arguments
|
|
|
|
=========
|
|
|
|
|
|
|
|
``fd``
|
2020-09-24 14:15:55 +08:00
|
|
|
File descriptor returned by :c:func:`open()`.
|
2016-07-09 02:55:42 +08:00
|
|
|
|
|
|
|
Description
|
|
|
|
===========
|
|
|
|
|
|
|
|
Closes the cec device. Resources associated with the file descriptor are
|
|
|
|
freed. The device configuration remain unchanged.
|
|
|
|
|
|
|
|
Return Value
|
|
|
|
============
|
|
|
|
|
2020-09-24 14:15:55 +08:00
|
|
|
:c:func:`close()` returns 0 on success. On error, -1 is returned, and
|
2016-07-09 02:55:42 +08:00
|
|
|
``errno`` is set appropriately. Possible error codes are:
|
|
|
|
|
2016-07-09 04:59:27 +08:00
|
|
|
``EBADF``
|
2016-07-09 02:55:42 +08:00
|
|
|
``fd`` is not a valid open file descriptor.
|