blob: e142ee73d15d6a374d189859ab83f7f8f21053f4 [file] [log] [blame]
Markus Heiser5377d912016-06-30 15:18:56 +02001.. -*- coding: utf-8; mode: rst -*-
2
3.. _media-func-close:
4
5*************
6media close()
7*************
8
9*man media-close(2)*
10
11Close a media device
12
13
14Synopsis
15========
16
17.. code-block:: c
18
19 #include <unistd.h>
20
21
Mauro Carvalho Chehabb7e67f62016-07-02 09:49:16 -030022.. cpp:function:: int close( int fd )
Markus Heiser5377d912016-06-30 15:18:56 +020023
24Arguments
25=========
26
27``fd``
28 File descriptor returned by :ref:`open() <func-open>`.
29
30
31Description
32===========
33
34Closes the media device. Resources associated with the file descriptor
35are freed. The device configuration remain unchanged.
36
37
38Return Value
39============
40
41:c:func:`close()` returns 0 on success. On error, -1 is returned, and
42``errno`` is set appropriately. Possible error codes are:
43
44EBADF
45 ``fd`` is not a valid open file descriptor.
46
47
48.. ------------------------------------------------------------------------------
49.. This file was automatically converted from DocBook-XML with the dbxml
50.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
51.. from the linux kernel, refer to:
52..
53.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
54.. ------------------------------------------------------------------------------