1 <refentry id="media-func-close">
3 <refentrytitle>media close()</refentrytitle>
8 <refname>media-close</refname>
9 <refpurpose>Close a media device</refpurpose>
14 <funcsynopsisinfo>#include <unistd.h></funcsynopsisinfo>
16 <funcdef>int <function>close</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
23 <title>Arguments</title>
27 <term><parameter>fd</parameter></term>
36 <title>Description</title>
38 <para>Closes the media device. Resources associated with the file descriptor
39 are freed. The device configuration remain unchanged.</para>
43 <title>Return Value</title>
45 <para><function>close</function> returns 0 on success. On error, -1 is
46 returned, and <varname>errno</varname> is set appropriately. Possible error
51 <term><errorcode>EBADF</errorcode></term>
53 <para><parameter>fd</parameter> is not a valid open file descriptor.