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 34:ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>`). 35Reads on the device must be done in blocks matching the bit count. 36The bit could should be rounded up so that it matches full bytes. 37 38 39Return Value 40============ 41 42On success 0 is returned, on error -1 and the ``errno`` variable is set 43appropriately. The generic error codes are described at the 44:ref:`Generic Error Codes <gen-errors>` chapter. 45