Commit | Line | Data |
---|---|---|
e2460b1d MH |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
3 | .. _cec-func-close: | |
4 | ||
5 | *********** | |
6 | cec close() | |
7 | *********** | |
8 | ||
21c62694 MH |
9 | Name |
10 | ==== | |
e2460b1d | 11 | |
21c62694 | 12 | cec-close - Close a cec device |
e2460b1d MH |
13 | |
14 | ||
15 | Synopsis | |
16 | ======== | |
17 | ||
18 | .. code-block:: c | |
19 | ||
20 | #include <unistd.h> | |
21 | ||
22 | ||
1b81f010 | 23 | .. c:function:: int close( int fd ) |
99547836 | 24 | :name: cec-close |
e2460b1d MH |
25 | |
26 | Arguments | |
27 | ========= | |
28 | ||
29 | ``fd`` | |
99547836 | 30 | File descriptor returned by :c:func:`open() <cec-open>`. |
e2460b1d MH |
31 | |
32 | ||
33 | Description | |
34 | =========== | |
35 | ||
b6b6e678 MCC |
36 | .. note:: |
37 | ||
38 | This documents the proposed CEC API. This API is not yet finalized | |
706f8a99 | 39 | and is currently only available as a staging kernel module. |
e2460b1d MH |
40 | |
41 | Closes the cec device. Resources associated with the file descriptor are | |
42 | freed. The device configuration remain unchanged. | |
43 | ||
44 | ||
45 | Return Value | |
46 | ============ | |
47 | ||
48 | :c:func:`close()` returns 0 on success. On error, -1 is returned, and | |
49 | ``errno`` is set appropriately. Possible error codes are: | |
50 | ||
b2a58436 | 51 | ``EBADF`` |
e2460b1d | 52 | ``fd`` is not a valid open file descriptor. |