<sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget4/translations/zh_CN/userspace-api/media/dvb/ca-fopenmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/zh_TW/userspace-api/media/dvb/ca-fopenmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/it_IT/userspace-api/media/dvb/ca-fopenmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/ja_JP/userspace-api/media/dvb/ca-fopenmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/ko_KR/userspace-api/media/dvb/ca-fopenmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/sp_SP/userspace-api/media/dvb/ca-fopenmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhN/var/lib/git/docbuild/linux/Documentation/userspace-api/media/dvb/ca-fopen.rsthKubhtarget)}(h .. _ca_fopen:h]h}(h]h ]h"]h$]h&]refidca-fopenuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hDigital TV CA open()h]hDigital TV CA open()}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hDigital TV CA open()h]hDigital TV CA open()}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleDTV.ca.open (C function) c.DTV.ca.openhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h%int open(const char *name, int flags)h]hdesc_signature_line)}(h%int open(const char *name, int flags)h](hdesc_sig_keyword_type)}(hinth]hint}(hj5hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j3hj/hhhhhKubhdesc_sig_space)}(h h]h }(hjFhhhNhNubah}(h]h ]wah"]h$]h&]uh1jDhj/hhhhhKubh desc_name)}(hopenh]h desc_sig_name)}(hopenh]hopen}(hj]hhhNhNubah}(h]h ]nah"]h$]h&]uh1j[hjWubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jUhj/hhhhhKubhdesc_parameterlist)}(h(const char *name, int flags)h](hdesc_parameter)}(hconst char *nameh](hdesc_sig_keyword)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhj|ubjE)}(h h]h }(hjhhhNhNubah}(h]h ]jQah"]h$]h&]uh1jDhj|ubj4)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj|ubjE)}(h h]h }(hjhhhNhNubah}(h]h ]jQah"]h$]h&]uh1jDhj|ubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhj|ubj\)}(hnameh]hname}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j[hj|ubeh}(h]h ]h"]h$]h&]noemphhhuh1jzhjvubj{)}(h int flagsh](j4)}(hinth]hint}(hjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjE)}(h h]h }(hjhhhNhNubah}(h]h ]jQah"]h$]h&]uh1jDhjubj\)}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]jhah"]h$]h&]uh1j[hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jzhjvubeh}(h]h ]h"]h$]h&]hhuh1jthj/hhhhhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1j-sphinx_line_type declaratorhj)hhhhhKubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j'hhhKhj$hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1j0hj$hhhhhKubeh}(h]h ](cfunctioneh"]h$]h&]domainj>objtypej?desctypej?noindex noindexentrynocontentsentryuh1j"hhhjhNhNubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h0``name`` Name of specific Digital TV CA device. h](hterm)}(h``name``h]hliteral)}(hjqh]hname}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjoubah}(h]h ]h"]h$]h&]uh1jmhhhKhjiubh definition)}(hhh]h)}(h&Name of specific Digital TV CA device.h]h&Name of specific Digital TV CA device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjiubeh}(h]h ]h"]h$]h&]uh1jghhhKhjdubjh)}(h0``flags`` A bit-wise OR of the following flags: h](jn)}(h ``flags``h]jt)}(hjh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1jmhhhKhjubj)}(hhh]h)}(h%A bit-wise OR of the following flags:h]h%A bit-wise OR of the following flags:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jghhhKhjdhhubeh}(h]h ]h"]h$]h&]uh1jbhjQhhhhhNubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{2.5cm}|p{15.0cm}|uh1jhhhKhjQhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h ``O_RDONLY``h]jt)}(hj#h]hO_RDONLY}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj!ubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hread-only accessh]hread-only access}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hj>ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h ``O_RDWR``h]jt)}(hjch]hO_RDWR}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jshjaubah}(h]h ]h"]h$]h&]uh1hhhhK'hj^ubah}(h]h ]h"]h$]h&]uh1jhj[ubj)}(hhh]h)}(hread/write accessh]hread/write access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hj~ubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``O_NONBLOCK``h]jt)}(hjh]h O_NONBLOCK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h8open in non-blocking mode (blocking mode is the default)h]h8open in non-blocking mode (blocking mode is the default)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjQhhhNhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK/ubh)}(h]This system call opens a named ca device (e.g. ``/dev/dvb/adapter?/ca?``) for subsequent use.h](h/This system call opens a named ca device (e.g. }(hjhhhNhNubjt)}(h``/dev/dvb/adapter?/ca?``h]h/dev/dvb/adapter?/ca?}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh) for subsequent use.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK1hjhhubh)}(hXWhen an ``open()`` call has succeeded, the device will be ready for use. The significance of blocking or non-blocking mode is described in the documentation for functions where there is a difference. It does not affect the semantics of the ``open()`` call itself. A device opened in blocking mode can later be put into non-blocking mode (and vice versa) using the ``F_SETFL`` command of the ``fcntl`` system call. This is a standard system call, documented in the Linux manual page for fcntl. Only one user can open the CA Device in ``O_RDWR`` mode. All other attempts to open the device in this mode will fail, and an error code will be returned.h](hWhen an }(hj'hhhNhNubjt)}(h ``open()``h]hopen()}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jshj'ubh call has succeeded, the device will be ready for use. The significance of blocking or non-blocking mode is described in the documentation for functions where there is a difference. It does not affect the semantics of the }(hj'hhhNhNubjt)}(h ``open()``h]hopen()}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jshj'ubhr call itself. A device opened in blocking mode can later be put into non-blocking mode (and vice versa) using the }(hj'hhhNhNubjt)}(h ``F_SETFL``h]hF_SETFL}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jshj'ubh command of the }(hj'hhhNhNubjt)}(h ``fcntl``h]hfcntl}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jshj'ubh system call. This is a standard system call, documented in the Linux manual page for fcntl. Only one user can open the CA Device in }(hj'hhhNhNubjt)}(h ``O_RDWR``h]hO_RDWR}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jshj'ubhh mode. All other attempts to open the device in this mode will fail, and an error code will be returned.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK4hjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK/ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK@ubh)}(hOn success 0 is returned.h]hOn success 0 is returned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjhhubh)}(hIOn error -1 is returned, and the ``errno`` variable is set appropriately.h](h!On error -1 is returned, and the }(hjhhhNhNubjt)}(h ``errno``h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshjubh variable is set appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKDhjhhubh)}(hYGeneric error codes are described at the :ref:`Generic Error Codes ` chapter.h](h)Generic error codes are described at the }(hjhhhNhNubh)}(h':ref:`Generic Error Codes `h]hinline)}(hjh]hGeneric Error Codes}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc userspace-api/media/dvb/ca-fopen refdomainjreftyperef refexplicitrefwarn reftarget gen-errorsuh1hhhhKGhjubh chapter.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKGhjhhubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhK@ubeh}(h](digital-tv-ca-openheh ]h"](digital tv ca open()ca_fopeneh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}jhsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjDerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}h]hasnameids}(jhjjhhjNjKjjjjjju nametypes}(jjhjNjjjuh}(hhjhhhjKjj j)jjQjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h.Hyperlink target "ca-fopen" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1juba transformerN include_log] decorationNhhub.