On 11/01/2018 12:18 AM, Sean Young wrote: > Note that LIRC_GET_FEATURES is the only ioctl which is always supported > now that there are send-only devices. Thanks, Sean. Applied. Cheers, Michael > Signed-off-by: Sean Young <sean@xxxxxxxx> > --- > man4/lirc.4 | 37 +++++++++++++++++-------------------- > 1 file changed, 17 insertions(+), 20 deletions(-) > > diff --git a/man4/lirc.4 b/man4/lirc.4 > index 58ea1193c..a8463a4a8 100644 > --- a/man4/lirc.4 > +++ b/man4/lirc.4 > @@ -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. > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/