~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/media/dvb/frontend_f_open.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2 .. c:namespace:: DTV.fe
  3 
  4 .. _frontend_f_open:
  5 
  6 ***************************
  7 Digital TV frontend open()
  8 ***************************
  9 
 10 Name
 11 ====
 12 
 13 fe-open - Open a frontend device
 14 
 15 Synopsis
 16 ========
 17 
 18 .. code-block:: c
 19 
 20     #include <fcntl.h>
 21 
 22 .. c:function:: int open( const char *device_name, int flags )
 23 
 24 Arguments
 25 =========
 26 
 27 ``device_name``
 28     Device to be opened.
 29 
 30 ``flags``
 31     Open flags. Access can either be ``O_RDWR`` or ``O_RDONLY``.
 32 
 33     Multiple opens are allowed with ``O_RDONLY``. In this mode, only
 34     query and read ioctls are allowed.
 35 
 36     Only one open is allowed in ``O_RDWR``. In this mode, all ioctls are
 37     allowed.
 38 
 39     When the ``O_NONBLOCK`` flag is given, the system calls may return
 40     ``EAGAIN`` error code when no data is available or when the device
 41     driver is temporarily busy.
 42 
 43     Other flags have no effect.
 44 
 45 Description
 46 ===========
 47 
 48 This system call opens a named frontend device
 49 (``/dev/dvb/adapter?/frontend?``) for subsequent use. Usually the first
 50 thing to do after a successful open is to find out the frontend type
 51 with :ref:`FE_GET_INFO`.
 52 
 53 The device can be opened in read-only mode, which only allows monitoring
 54 of device status and statistics, or read/write mode, which allows any
 55 kind of use (e.g. performing tuning operations.)
 56 
 57 In a system with multiple front-ends, it is usually the case that
 58 multiple devices cannot be open in read/write mode simultaneously. As
 59 long as a front-end device is opened in read/write mode, other open()
 60 calls in read/write mode will either fail or block, depending on whether
 61 non-blocking or blocking mode was specified. A front-end device opened
 62 in blocking mode can later be put into non-blocking mode (and vice
 63 versa) using the F_SETFL command of the fcntl system call. This is a
 64 standard system call, documented in the Linux manual page for fcntl.
 65 When an open() call has succeeded, the device will be ready for use in
 66 the specified mode. This implies that the corresponding hardware is
 67 powered up, and that other front-ends may have been powered down to make
 68 that possible.
 69 
 70 Return Value
 71 ============
 72 
 73 On success :c:func:`open()` returns the new file descriptor.
 74 On error, -1 is returned, and the ``errno`` variable is set appropriately.
 75 
 76 Possible error codes are:
 77 
 78 On success 0 is returned, and :c:type:`ca_slot_info` is filled.
 79 
 80 On error -1 is returned, and the ``errno`` variable is set
 81 appropriately.
 82 
 83 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
 84 
 85 .. flat-table::
 86     :header-rows:  0
 87     :stub-columns: 0
 88     :widths: 1 16
 89 
 90     -  - ``EPERM``
 91        -  The caller has no permission to access the device.
 92 
 93     -  - ``EBUSY``
 94        -  The device driver is already in use.
 95 
 96     -  - ``EMFILE``
 97        -  The process already has the maximum number of files open.
 98 
 99     -  - ``ENFILE``
100        -  The limit on the total number of files open on the system has been
101           reached.
102 
103 The generic error codes are described at the
104 :ref:`Generic Error Codes <gen-errors>` chapter.

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php