Re: staging: speakup: add send_xchar, tiocmset and input functionality for tty

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

 



Okash Khawaja, on sam. 29 avril 2017 13:48:09 +0100, wrote:
> +static unsigned char ttyio_in(int timeout)
> +{
> +	struct spk_ldisc_data *ldisc_data = speakup_tty->disc_data;
> +	char rv;
> +
> +	if (down_timeout(&ldisc_data->sem, usecs_to_jiffies(timeout)) != 0) {
> +		pr_warn("spk_ttyio: timeout (%d)  while waiting for input\n",
> +				timeout);
> +		return 0xff;
> +	}

> +static unsigned char spk_ttyio_in_nowait(void)
> +{
> +	return ttyio_in(0);
> +}

Thinking of it: for spk_ttyio_in_nowait(), we shouldn't print a warning
when down_timeout returns ETIMEDOUT. So pr_warn should be guarded by
"if (timeout)".

Also, spk_ttyio_in_nowait() should return 0 instead of 0xff on timeout,
since that's used for synth_insert_next_index() which takes 0 as "no new
value", not 0xff.

I know, it's converging slowly, but we need to make sure we don't change
things, otherwise it'll bring regressions.

Samuel
_______________________________________________
Speakup mailing list
Speakup@xxxxxxxxxxxxxxxxx
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux