Re: [PATCH 5/5] tty: serial: uartlite: Prevent changing fixed parameters
From: Maarten Brock <hidden>
Date: 2021-08-09 09:29:09
On 2021-07-30 07:25, Greg Kroah-Hartman wrote:
On Thu, Jul 29, 2021 at 11:43:08AM -0400, Sean Anderson wrote:quoted
On 7/29/21 11:32 AM, Greg Kroah-Hartman wrote:quoted
On Thu, Jul 29, 2021 at 11:26:59AM -0400, Sean Anderson wrote:quoted
On 7/29/21 11:01 AM, Greg Kroah-Hartman wrote:quoted
On Fri, Jul 23, 2021 at 06:31:51PM -0400, Sean Anderson wrote: Through all of this, you are warning that nothing is supported, yet you are continuing on as if all of this worked just fine.We don't. The idea is that we see if (e.g.) CSIZE is something the hardware can't produce, warn about it (once), and then set it to what we can support.So you are ignoring what the user wanted, and doing whatever you wanted. As you can only support one setting, why even care? Just set it to what you want and ignore userspace's requests.That is exactly what we are doing. We set it to what we can support and ignore what userspace requested.If you can only support one set of options, just set it and always fail the tcsetattr call which will allow userspace to know it shouldn't have tried to do that.
I have to disagree strongly here against *always*. If the user calls tcsetattr to set it to exactly what is supported it *should not fail*. Every decent (terminal) program will start by setting or getting the initial settings. Maarten