1.. -*- coding: utf-8; mode: rst -*- 2 3.. _lirc_get_length: 4 5********************* 6ioctl LIRC_GET_LENGTH 7********************* 8 9Name 10==== 11 12LIRC_GET_LENGTH - Retrieves the code length in bits. 13 14Synopsis 15======== 16 17.. c:function:: int ioctl( int fd, LIRC_GET_LENGTH, __u32 *length ) 18 :name: LIRC_GET_LENGTH 19 20Arguments 21========= 22 23``fd`` 24 File descriptor returned by open(). 25 26``length`` 27 length, in bits 28 29 30Description 31=========== 32 33Retrieves the code length in bits (only for ``LIRC-MODE-LIRCCODE``). 34Reads on the device must be done in blocks matching the bit count. 35The bit could should be rounded up so that it matches full bytes. 36 37 38Return Value 39============ 40 41On success 0 is returned, on error -1 and the ``errno`` variable is set 42appropriately. The generic error codes are described at the 43:ref:`Generic Error Codes <gen-errors>` chapter. 44