xref: /linux/Documentation/userspace-api/media/dvb/fe-get-event.rst (revision cbecf716ca618fd44feda6bd9a64a8179d031fc5)
1059b1c5bSMauro Carvalho Chehab.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2*f9b2e8aaSMauro Carvalho Chehab.. c:namespace:: DTV.fe
354f38fcaSMauro Carvalho Chehab
454f38fcaSMauro Carvalho Chehab.. _FE_GET_EVENT:
554f38fcaSMauro Carvalho Chehab
654f38fcaSMauro Carvalho Chehab************
754f38fcaSMauro Carvalho ChehabFE_GET_EVENT
854f38fcaSMauro Carvalho Chehab************
954f38fcaSMauro Carvalho Chehab
1054f38fcaSMauro Carvalho ChehabName
1154f38fcaSMauro Carvalho Chehab====
1254f38fcaSMauro Carvalho Chehab
1354f38fcaSMauro Carvalho ChehabFE_GET_EVENT
1454f38fcaSMauro Carvalho Chehab
1554f38fcaSMauro Carvalho Chehab.. attention:: This ioctl is deprecated.
1654f38fcaSMauro Carvalho Chehab
1754f38fcaSMauro Carvalho ChehabSynopsis
1854f38fcaSMauro Carvalho Chehab========
1954f38fcaSMauro Carvalho Chehab
20*f9b2e8aaSMauro Carvalho Chehab.. c:macro:: FE_GET_EVENT
2154f38fcaSMauro Carvalho Chehab
22*f9b2e8aaSMauro Carvalho Chehab``int ioctl(int fd, FE_GET_EVENT, struct dvb_frontend_event *ev)``
2354f38fcaSMauro Carvalho Chehab
2454f38fcaSMauro Carvalho ChehabArguments
2554f38fcaSMauro Carvalho Chehab=========
2654f38fcaSMauro Carvalho Chehab
2754f38fcaSMauro Carvalho Chehab``fd``
28*f9b2e8aaSMauro Carvalho Chehab    File descriptor returned by :c:func:`open()`.
2954f38fcaSMauro Carvalho Chehab
3054f38fcaSMauro Carvalho Chehab``ev``
3154f38fcaSMauro Carvalho Chehab    Points to the location where the event, if any, is to be stored.
3254f38fcaSMauro Carvalho Chehab
3354f38fcaSMauro Carvalho ChehabDescription
3454f38fcaSMauro Carvalho Chehab===========
3554f38fcaSMauro Carvalho Chehab
3654f38fcaSMauro Carvalho ChehabThis ioctl call returns a frontend event if available. If an event is
3754f38fcaSMauro Carvalho Chehabnot available, the behavior depends on whether the device is in blocking
3854f38fcaSMauro Carvalho Chehabor non-blocking mode. In the latter case, the call fails immediately
3954f38fcaSMauro Carvalho Chehabwith errno set to ``EWOULDBLOCK``. In the former case, the call blocks until
4054f38fcaSMauro Carvalho Chehaban event becomes available.
4154f38fcaSMauro Carvalho Chehab
4254f38fcaSMauro Carvalho ChehabReturn Value
4354f38fcaSMauro Carvalho Chehab============
4454f38fcaSMauro Carvalho Chehab
4554f38fcaSMauro Carvalho ChehabOn success 0 is returned.
4654f38fcaSMauro Carvalho Chehab
4754f38fcaSMauro Carvalho ChehabOn error -1 is returned, and the ``errno`` variable is set
4854f38fcaSMauro Carvalho Chehabappropriately.
4954f38fcaSMauro Carvalho Chehab
5054f38fcaSMauro Carvalho Chehab.. flat-table::
5154f38fcaSMauro Carvalho Chehab    :header-rows:  0
5254f38fcaSMauro Carvalho Chehab    :stub-columns: 0
5354f38fcaSMauro Carvalho Chehab
5454f38fcaSMauro Carvalho Chehab    -  .. row 1
5554f38fcaSMauro Carvalho Chehab
5654f38fcaSMauro Carvalho Chehab       -  ``EWOULDBLOCK``
5754f38fcaSMauro Carvalho Chehab
5854f38fcaSMauro Carvalho Chehab       -  There is no event pending, and the device is in non-blocking mode.
5954f38fcaSMauro Carvalho Chehab
6054f38fcaSMauro Carvalho Chehab    -  .. row 2
6154f38fcaSMauro Carvalho Chehab
6254f38fcaSMauro Carvalho Chehab       -  ``EOVERFLOW``
6354f38fcaSMauro Carvalho Chehab
6454f38fcaSMauro Carvalho Chehab       -  Overflow in event queue - one or more events were lost.
6554f38fcaSMauro Carvalho Chehab
6654f38fcaSMauro Carvalho ChehabGeneric error codes are described at the
6754f38fcaSMauro Carvalho Chehab:ref:`Generic Error Codes <gen-errors>` chapter.
68