blob: 28fd055bf71ba774e1c7c1aec878792f5e5df3b6 [file] [log] [blame]
Markus Heiser5377d912016-06-30 15:18:56 +02001.. -*- coding: utf-8; mode: rst -*-
2
3.. _func-close:
4
5************
6V4L2 close()
7************
8
9*man v4l2-close(2)*
10
11Close a V4L2 device
12
13
14Synopsis
15========
16
17.. code-block:: c
18
19 #include <unistd.h>
20
21
22.. c:function:: int close( int fd )
23
24Arguments
25=========
26
27``fd``
28 File descriptor returned by :ref:`open() <func-open>`.
29
30
31Description
32===========
33
34Closes the device. Any I/O in progress is terminated and resources
35associated with the file descriptor are freed. However data format
36parameters, current input or output, control values or other properties
37remain unchanged.
38
39
40Return Value
41============
42
43The function returns 0 on success, -1 on failure and the ``errno`` is
44set appropriately. Possible error codes:
45
46EBADF
47 ``fd`` is not a valid open file descriptor.
48
49
50.. ------------------------------------------------------------------------------
51.. This file was automatically converted from DocBook-XML with the dbxml
52.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
53.. from the linux kernel, refer to:
54..
55.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
56.. ------------------------------------------------------------------------------