Commit | Line | Data |
---|---|---|
47d23e36 MCC |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
3 | .. _ca_fopen: | |
4 | ||
586027ce | 5 | ============= |
47d23e36 MCC |
6 | DVB CA open() |
7 | ============= | |
8 | ||
15e7d615 | 9 | Name |
586027ce | 10 | ---- |
47d23e36 | 11 | |
586027ce | 12 | DVB CA open() |
47d23e36 | 13 | |
15e7d615 MCC |
14 | |
15 | Synopsis | |
47d23e36 MCC |
16 | -------- |
17 | ||
cf8076c3 MCC |
18 | .. c:function:: int open(const char *name, int flags) |
19 | :name: dvb-ca-open | |
47d23e36 | 20 | |
47d23e36 | 21 | |
15e7d615 | 22 | Arguments |
586027ce | 23 | --------- |
47d23e36 | 24 | |
cf8076c3 MCC |
25 | ``name`` |
26 | Name of specific DVB CA device. | |
27 | ||
28 | ``flags`` | |
29 | A bit-wise OR of the following flags: | |
30 | ||
47d23e36 MCC |
31 | .. flat-table:: |
32 | :header-rows: 0 | |
33 | :stub-columns: 0 | |
34 | ||
cf8076c3 MCC |
35 | - |
36 | - O_RDONLY | |
37 | - read-only access | |
47d23e36 | 38 | |
cf8076c3 MCC |
39 | - |
40 | - O_RDWR | |
41 | - read/write access | |
47d23e36 | 42 | |
cf8076c3 MCC |
43 | - |
44 | - O_NONBLOCK | |
45 | - open in non-blocking mode | |
46 | (blocking mode is the default) | |
47d23e36 MCC |
47 | |
48 | ||
15e7d615 | 49 | Description |
586027ce | 50 | ----------- |
47d23e36 | 51 | |
586027ce MCC |
52 | This system call opens a named ca device (e.g. /dev/ost/ca) for |
53 | subsequent use. | |
47d23e36 | 54 | |
586027ce MCC |
55 | When an open() call has succeeded, the device will be ready for use. The |
56 | significance of blocking or non-blocking mode is described in the | |
57 | documentation for functions where there is a difference. It does not | |
58 | affect the semantics of the open() call itself. A device opened in | |
59 | blocking mode can later be put into non-blocking mode (and vice versa) | |
60 | using the F_SETFL command of the fcntl system call. This is a standard | |
61 | system call, documented in the Linux manual page for fcntl. Only one | |
62 | user can open the CA Device in O_RDWR mode. All other attempts to open | |
63 | the device in this mode will fail, and an error code will be returned. | |
64 | ||
65 | ||
15e7d615 | 66 | Return Value |
586027ce | 67 | ------------ |
47d23e36 | 68 | |
16dac354 MCC |
69 | .. tabularcolumns:: |p{2.5cm}|p{15.0cm}| |
70 | ||
47d23e36 MCC |
71 | .. flat-table:: |
72 | :header-rows: 0 | |
73 | :stub-columns: 0 | |
74 | ||
75 | ||
76 | - .. row 1 | |
77 | ||
78 | - ``ENODEV`` | |
79 | ||
80 | - Device driver not loaded/available. | |
81 | ||
82 | - .. row 2 | |
83 | ||
84 | - ``EINTERNAL`` | |
85 | ||
86 | - Internal error. | |
87 | ||
88 | - .. row 3 | |
89 | ||
90 | - ``EBUSY`` | |
91 | ||
92 | - Device or resource busy. | |
93 | ||
94 | - .. row 4 | |
95 | ||
96 | - ``EINVAL`` | |
97 | ||
98 | - Invalid argument. |