1 .. -*- coding: utf-8; mode: rst -*-
12 media-open - Open a media device
23 .. c:function:: int open( const char *device_name, int flags )
33 Open flags. Access mode must be either ``O_RDONLY`` or ``O_RDWR``.
34 Other flags have no effect.
40 To open a media device applications call :ref:`open() <media-func-open>` with the
41 desired device name. The function has no side effects; the device
42 configuration remain unchanged.
44 When the device is opened in read-only mode, attempts to modify its
45 configuration will result in an error, and ``errno`` will be set to
52 :ref:`open() <func-open>` returns the new file descriptor on success. On error,
53 -1 is returned, and ``errno`` is set appropriately. Possible error codes
57 The requested access to the file is not allowed.
60 The process already has the maximum number of files open.
63 The system limit on the total number of open files has been reached.
66 Insufficient kernel memory was available.
69 No device corresponding to this device special file exists.