func-close.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <refentry id="func-close">
  2. <refmeta>
  3. <refentrytitle>V4L2 close()</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>v4l2-close</refname>
  8. <refpurpose>Close a V4L2 device</refpurpose>
  9. </refnamediv>
  10. <refsynopsisdiv>
  11. <funcsynopsis>
  12. <funcsynopsisinfo>#include &lt;unistd.h&gt;</funcsynopsisinfo>
  13. <funcprototype>
  14. <funcdef>int <function>close</function></funcdef>
  15. <paramdef>int <parameter>fd</parameter></paramdef>
  16. </funcprototype>
  17. </funcsynopsis>
  18. </refsynopsisdiv>
  19. <refsect1>
  20. <title>Arguments</title>
  21. <variablelist>
  22. <varlistentry>
  23. <term><parameter>fd</parameter></term>
  24. <listitem>
  25. <para>&fd;</para>
  26. </listitem>
  27. </varlistentry>
  28. </variablelist>
  29. </refsect1>
  30. <refsect1>
  31. <title>Description</title>
  32. <para>Closes the device. Any I/O in progress is terminated and
  33. resources associated with the file descriptor are freed. However data
  34. format parameters, current input or output, control values or other
  35. properties remain unchanged.</para>
  36. </refsect1>
  37. <refsect1>
  38. <title>Return Value</title>
  39. <para>The function returns <returnvalue>0</returnvalue> on
  40. success, <returnvalue>-1</returnvalue> on failure and the
  41. <varname>errno</varname> is set appropriately. Possible error
  42. codes:</para>
  43. <variablelist>
  44. <varlistentry>
  45. <term><errorcode>EBADF</errorcode></term>
  46. <listitem>
  47. <para><parameter>fd</parameter> is not a valid open file
  48. descriptor.</para>
  49. </listitem>
  50. </varlistentry>
  51. </variablelist>
  52. </refsect1>
  53. </refentry>