Merge tag 'tags/bcm2835-defconfig-next-2018-11-27' into defconfig/next
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / fe-get-event.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _FE_GET_EVENT:
11
12 ************
13 FE_GET_EVENT
14 ************
15
16 Name
17 ====
18
19 FE_GET_EVENT
20
21 .. attention:: This ioctl is deprecated.
22
23
24 Synopsis
25 ========
26
27 .. c:function:: int  ioctl(int fd, FE_GET_EVENT, struct dvb_frontend_event *ev)
28     :name: FE_GET_EVENT
29
30
31 Arguments
32 =========
33
34 ``fd``
35     File descriptor returned by :c:func:`open() <dvb-fe-open>`.
36
37 ``ev``
38     Points to the location where the event, if any, is to be stored.
39
40
41 Description
42 ===========
43
44 This ioctl call returns a frontend event if available. If an event is
45 not available, the behavior depends on whether the device is in blocking
46 or non-blocking mode. In the latter case, the call fails immediately
47 with errno set to ``EWOULDBLOCK``. In the former case, the call blocks until
48 an event becomes available.
49
50
51 Return Value
52 ============
53
54 On success 0 is returned.
55
56 On error -1 is returned, and the ``errno`` variable is set
57 appropriately.
58
59
60 .. flat-table::
61     :header-rows:  0
62     :stub-columns: 0
63
64
65     -  .. row 1
66
67        -  ``EWOULDBLOCK``
68
69        -  There is no event pending, and the device is in non-blocking mode.
70
71     -  .. row 2
72
73        -  ``EOVERFLOW``
74
75        -  Overflow in event queue - one or more events were lost.
76
77 Generic error codes are described at the
78 :ref:`Generic Error Codes <gen-errors>` chapter.