Re: [PATCH v2 4/4] lirc.4: document error returns more explicitly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sean,

See comments below.

On 11/02/2018 12:04 PM, Sean Young wrote:
> Signed-off-by: Sean Young <sean@xxxxxxxx>
> ---
>  man4/lirc.4 | 24 +++++++++++++++++++++---
>  1 file changed, 21 insertions(+), 3 deletions(-)
> 
> diff --git a/man4/lirc.4 b/man4/lirc.4
> index e28a46377..0844f60cc 100644
> --- a/man4/lirc.4
> +++ b/man4/lirc.4
> @@ -187,7 +187,11 @@ If a driver does not announce support of certain features, calling of
>  the corresponding ioctls will return ENOTTY.
>  .TP
>  .BR LIRC_GET_REC_MODE " (\fIvoid\fP)"
> -Return the receive mode, which will be one of:
> +If the
> +.B lirc
> +device has no receiver return
> +.B ENOTTY,

In cases like this, please format as

.BR ENOTTY ,

But, more significantly, the language you are using here and below
feels strange. You write imperative sentences ("If ... return") as
though these are instructions to lirc device drive developers),
whereas most of the rest of the page reads as active-voice
informational text for users of lirc devices.

Why this difference in phrasing?

At this stage, I've not applied this patch.

Thanks,

Michael


> +else return the receive mode, which will be one of:
>  .RS 4
>  .TP
>  .BR LIRC_MODE_MODE2
> @@ -207,6 +211,10 @@ is either
>  .BR LIRC_MODE_SCANCODE
>  or
>  .BR LIRC_MODE_MODE2 .
> +If the
> +.B lirc
> +device has no receiver, return
> +.B ENOTTY.
>  .TP
>  .BR LIRC_GET_SEND_MODE " (\fIvoid\fP)"
>  Return the send mode.
> @@ -214,6 +222,10 @@ Return the send mode.
>  or
>  .BR LIRC_MODE_SCANCODE
>  is supported.
> +If the
> +.B lirc
> +device cannot send, return
> +.B ENOTTY.
>  .TP
>  .BR LIRC_SET_SEND_MODE " (\fIint\fP)"
>  Set the send mode.
> @@ -221,7 +233,12 @@ Set the send mode.
>  is either
>  .BR LIRC_MODE_SCANCODE
>  or
> -.BR LIRC_MODE_PULSE.
> +.BR LIRC_MODE_PULSE .
> +If the
> +.B lirc
> +device cannot send, return
> +.B ENOTTY
> +.
>  .TP
>  .BR LIRC_SET_SEND_CARRIER " (\fIint\fP)"
>  Set the modulation frequency.
> @@ -252,7 +269,8 @@ For such drivers,
>  .BR LIRC_GET_MIN_TIMEOUT
>  and
>  .BR LIRC_GET_MAX_TIMEOUT
> -will return the same value.
> +will return
> +.BR ENOTTY .
>  .TP
>  .BR LIRC_SET_REC_TIMEOUT " (\fIint\fP)"
>  Set the integer value for IR inactivity timeout (microseconds).
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux