summaryrefslogtreecommitdiff
path: root/Documentation/DocBook/media/v4l/cec-func-close.xml
blob: 0812c8cd963437cce9f429db2f30847747b0d4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<refentry id="cec-func-close">
  <refmeta>
    <refentrytitle>cec close()</refentrytitle>
    &manvol;
  </refmeta>

  <refnamediv>
    <refname>cec-close</refname>
    <refpurpose>Close a cec device</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <funcsynopsis>
      <funcsynopsisinfo>#include &lt;unistd.h&gt;</funcsynopsisinfo>
      <funcprototype>
	<funcdef>int <function>close</function></funcdef>
	<paramdef>int <parameter>fd</parameter></paramdef>
      </funcprototype>
    </funcsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Arguments</title>

    <variablelist>
      <varlistentry>
	<term><parameter>fd</parameter></term>
	<listitem>
	  <para>&fd;</para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>
      Note: this documents the proposed CEC API. This API is not yet finalized and
      is currently only available as a staging kernel module.
    </para>

    <para>Closes the cec device. Resources associated with the file descriptor
    are freed. The device configuration remain unchanged.</para>
  </refsect1>

  <refsect1>
    <title>Return Value</title>

    <para><function>close</function> returns 0 on success. On error, -1 is
    returned, and <varname>errno</varname> is set appropriately. Possible error
    codes are:</para>

    <variablelist>
      <varlistentry>
	<term><errorcode>EBADF</errorcode></term>
	<listitem>
	  <para><parameter>fd</parameter> is not a valid open file descriptor.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
</refentry>