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/media/uapi/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
19 cec-ioctl - Control a cec device
26 #include <sys/ioctl.h>
29 .. c:function:: int ioctl( int fd, int request, void *argp )
36 File descriptor returned by :c:func:`open() <cec-open>`.
39 CEC ioctl request code as defined in the cec.h header file, for
40 example :ref:`CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`.
43 Pointer to a request-specific structure.
49 The :c:func:`ioctl() <cec-ioctl>` function manipulates cec device parameters. The
50 argument ``fd`` must be an open file descriptor.
52 The ioctl ``request`` code specifies the cec function to be called. It
53 has encoded in it whether the argument is an input, output or read/write
54 parameter, and the size of the argument ``argp`` in bytes.
56 Macros and structures definitions specifying cec ioctl requests and
57 their parameters are located in the cec.h header file. All cec ioctl
58 requests, their respective function and parameters are specified in
65 On success 0 is returned, on error -1 and the ``errno`` variable is set
66 appropriately. The generic error codes are described at the
67 :ref:`Generic Error Codes <gen-errors>` chapter.
69 Request-specific error codes are listed in the individual requests
72 When an ioctl that takes an output or read/write parameter fails, the
73 parameter remains unmodified.