1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 3.. _func-close: 4 5************ 6V4L2 close() 7************ 8 9Name 10==== 11 12v4l2-close - Close a V4L2 device 13 14 15Synopsis 16======== 17 18.. code-block:: c 19 20 #include <unistd.h> 21 22 23.. c:function:: int close( int fd ) 24 :name: v4l2-close 25 26Arguments 27========= 28 29``fd`` 30 File descriptor returned by :ref:`open() <func-open>`. 31 32 33Description 34=========== 35 36Closes the device. Any I/O in progress is terminated and resources 37associated with the file descriptor are freed. However data format 38parameters, current input or output, control values or other properties 39remain unchanged. 40 41 42Return Value 43============ 44 45The function returns 0 on success, -1 on failure and the ``errno`` is 46set appropriately. Possible error codes: 47 48EBADF 49 ``fd`` is not a valid open file descriptor. 50