lirc.4: Unsupported ioctl() operationsalways return ENOTTY

Note that LIRC_GET_FEATURES is the only ioctl() which is always
supported now that there are send-only devices.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Sean Young 2018-10-31 23:18:01 +00:00 committed by Michael Kerrisk
parent a0d4d60521
commit 85e952c63d
1 changed files with 17 additions and 20 deletions

View File

@ -55,8 +55,9 @@ of hardware can also be used in
mode, in which case the kernel IR decoders will decode the IR. These
decoders can be written in bpf(2) and attached to the lirc device.
.PP
The \fBLIRC_GET_REC_MODE\fR ioctl (see below) allows probing for the
mode.
The \fBLIRC_GET_FEATURES\fR ioctl (see below) allows probing for whether
receiving and sending is supported, and in which modes, amongst other
features.
.\"
.SS Reading input with the LIRC_MODE_MODE2 mode
.PP
@ -156,35 +157,31 @@ initially.
.TP 4
.BR LIRC_GET_FEATURES " (\fIvoid\fP)"
Returns a bit mask of combined features bits; see FEATURES.
Some drivers have dynamic features which are not updated until after an
.I init()
command.
.PP
If a device returns an error code for
.BR LIRC_GET_FEATURES ,
it is safe to assume it is not a lirc device.
.\"
.SS Optional Commands
.PP
Some lirc devices support commands listed below.
Unless otherwise stated, these fail with the error \fBENOTTY\fR if the
operation isn't supported, or with the error \fBEINVAL\fR if the operation
failed, or invalid arguments were provided.
If a driver does not announce support of certain features, calling of
the corresponding ioctls is undefined.
the corresponding ioctls will return ENOTTY.
.TP
.BR LIRC_GET_REC_MODE
.BR LIRC_GET_REC_MODE " (\fIvoid\fP)"
Return the receive mode, which will be one of:
.RS 4
.TP
.BR LIRC_MODE_MODE2 " (\fIvoid\fP)"
.BR LIRC_MODE_MODE2
The driver returns a sequence of pulse/space durations.
.TP
.BR LIRC_MODE_SCANCODE
The driver returns struct lirc_scancode values, each of which represents
a decoded button press.
.RE
.PP
If a device returns an error code for
.BR LIRC_GET_REC_MODE ,
it is safe to assume it is not a lirc device.
.\"
.SS Optional Commands
.PP
Some lirc devices support commands listed below.
Unless otherwise stated, these fail with the error \fBENOIOCTLCMD\fR
or with the error \fBENOSYS\fR if the operation
isn't supported, or with the error \fBEINVAL\fR if the operation
failed.
.TP
.BR LIRC_SET_REC_MODE " (\fIint\fP)"
Set the receive mode.