blob: e10d675546f8539ef854a818fb18fcae90183b0b [file] [log] [blame]
Mauro Carvalho Chehab82559ac2018-08-30 10:15:26 -04001.. Permission is granted to copy, distribute and/or modify this
2.. document under the terms of the GNU Free Documentation License,
3.. Version 1.1 or any later version published by the Free Software
4.. Foundation, with no Invariant Sections, no Front-Cover Texts
5.. and no Back-Cover Texts. A copy of the license is included at
6.. Documentation/media/uapi/fdl-appendix.rst.
7..
8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
Markus Heisere2460b12016-07-08 20:55:42 +020010.. _cec-func-close:
11
12***********
13cec close()
14***********
15
Markus Heiser21c62692016-07-08 20:55:43 +020016Name
17====
Markus Heisere2460b12016-07-08 20:55:42 +020018
Markus Heiser21c62692016-07-08 20:55:43 +020019cec-close - Close a cec device
Markus Heisere2460b12016-07-08 20:55:42 +020020
21
22Synopsis
23========
24
25.. code-block:: c
26
27 #include <unistd.h>
28
29
Mauro Carvalho Chehab1b81f012016-08-19 12:00:43 -030030.. c:function:: int close( int fd )
Mauro Carvalho Chehab99547832016-08-19 16:58:14 -030031 :name: cec-close
Markus Heisere2460b12016-07-08 20:55:42 +020032
33Arguments
34=========
35
36``fd``
Mauro Carvalho Chehab99547832016-08-19 16:58:14 -030037 File descriptor returned by :c:func:`open() <cec-open>`.
Markus Heisere2460b12016-07-08 20:55:42 +020038
39
40Description
41===========
42
Markus Heisere2460b12016-07-08 20:55:42 +020043Closes the cec device. Resources associated with the file descriptor are
44freed. The device configuration remain unchanged.
45
46
47Return Value
48============
49
Hans Verkuilcfaf3842017-07-28 06:31:50 -040050:c:func:`close() <cec-close>` returns 0 on success. On error, -1 is returned, and
Markus Heisere2460b12016-07-08 20:55:42 +020051``errno`` is set appropriately. Possible error codes are:
52
Mauro Carvalho Chehabb2a58432016-07-08 17:59:27 -030053``EBADF``
Markus Heisere2460b12016-07-08 20:55:42 +020054 ``fd`` is not a valid open file descriptor.