Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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.
7..
8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10.. _video_fopen:
11
12================
13dvb video open()
14================
15
16Name
17----
18
19dvb video open()
20
21.. attention:: This ioctl is deprecated.
22
23Synopsis
24--------
25
26.. c:function:: int open(const char *deviceName, int flags)
27
28
29Arguments
30---------
31
32.. flat-table::
33 :header-rows: 0
34 :stub-columns: 0
35
36
37 - .. row 1
38
39 - const char \*deviceName
40
41 - Name of specific video device.
42
43 - .. row 2
44
45 - int flags
46
47 - A bit-wise OR of the following flags:
48
49 - .. row 3
50
51 -
52 - O_RDONLY read-only access
53
54 - .. row 4
55
56 -
57 - O_RDWR read/write access
58
59 - .. row 5
60
61 -
62 - O_NONBLOCK open in non-blocking mode
63
64 - .. row 6
65
66 -
67 - (blocking mode is the default)
68
69
70Description
71-----------
72
73This system call opens a named video device (e.g.
74/dev/dvb/adapter0/video0) for subsequent use.
75
76When an open() call has succeeded, the device will be ready for use. The
77significance of blocking or non-blocking mode is described in the
78documentation for functions where there is a difference. It does not
79affect the semantics of the open() call itself. A device opened in
80blocking mode can later be put into non-blocking mode (and vice versa)
81using the F_SETFL command of the fcntl system call. This is a standard
82system call, documented in the Linux manual page for fcntl. Only one
83user can open the Video Device in O_RDWR mode. All other attempts to
84open the device in this mode will fail, and an error-code will be
85returned. If the Video Device is opened in O_RDONLY mode, the only
86ioctl call that can be used is VIDEO_GET_STATUS. All other call will
87return an error code.
88
89
90Return Value
91------------
92
93.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
94
95.. flat-table::
96 :header-rows: 0
97 :stub-columns: 0
98
99
100 - .. row 1
101
102 - ``ENODEV``
103
104 - Device driver not loaded/available.
105
106 - .. row 2
107
108 - ``EINTERNAL``
109
110 - Internal error.
111
112 - .. row 3
113
114 - ``EBUSY``
115
116 - Device or resource busy.
117
118 - .. row 4
119
120 - ``EINVAL``
121
122 - Invalid argument.