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/userspace-api/media/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
19 media-open - Open a media device
30 .. c:function:: int open( const char *device_name, int flags )
40 Open flags. Access mode must be either ``O_RDONLY`` or ``O_RDWR``.
41 Other flags have no effect.
47 To open a media device applications call :ref:`open() <media-func-open>` with the
48 desired device name. The function has no side effects; the device
49 configuration remain unchanged.
51 When the device is opened in read-only mode, attempts to modify its
52 configuration will result in an error, and ``errno`` will be set to
59 :ref:`open() <func-open>` returns the new file descriptor on success. On error,
60 -1 is returned, and ``errno`` is set appropriately. Possible error codes
64 The requested access to the file is not allowed.
67 The process already has the maximum number of files open.
70 The system limit on the total number of open files has been reached.
73 Insufficient kernel memory was available.
76 No device corresponding to this device special file exists.