1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3.. _FE_GET_EVENT:
4
5************
6FE_GET_EVENT
7************
8
9Name
10====
11
12FE_GET_EVENT
13
14.. attention:: This ioctl is deprecated.
15
16
17Synopsis
18========
19
20.. c:function:: int  ioctl(int fd, FE_GET_EVENT, struct dvb_frontend_event *ev)
21    :name: FE_GET_EVENT
22
23
24Arguments
25=========
26
27``fd``
28    File descriptor returned by :c:func:`open() <dvb-fe-open>`.
29
30``ev``
31    Points to the location where the event, if any, is to be stored.
32
33
34Description
35===========
36
37This ioctl call returns a frontend event if available. If an event is
38not available, the behavior depends on whether the device is in blocking
39or non-blocking mode. In the latter case, the call fails immediately
40with errno set to ``EWOULDBLOCK``. In the former case, the call blocks until
41an event becomes available.
42
43
44Return Value
45============
46
47On success 0 is returned.
48
49On error -1 is returned, and the ``errno`` variable is set
50appropriately.
51
52
53.. flat-table::
54    :header-rows:  0
55    :stub-columns: 0
56
57
58    -  .. row 1
59
60       -  ``EWOULDBLOCK``
61
62       -  There is no event pending, and the device is in non-blocking mode.
63
64    -  .. row 2
65
66       -  ``EOVERFLOW``
67
68       -  Overflow in event queue - one or more events were lost.
69
70Generic error codes are described at the
71:ref:`Generic Error Codes <gen-errors>` chapter.
72