coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] stty: don't treat baud rates of (speed_t) -1 as invalid


From: Pádraig Brady
Subject: Re: [PATCH] stty: don't treat baud rates of (speed_t) -1 as invalid
Date: Mon, 19 Oct 2026 08:17:36 +0100
User-agent: Mozilla Thunderbird Beta

On 19/10/2026 06:37, Collin Funk wrote:
It would be good to add a test for this, but it seems a bit tricky to
see if a baud rate of UINT_MAX is supported without using 'stty'
itself, since a buggy version would mistakenly say it is unsupported.

Perhaps a Perl or Python script will do? I'll check tomorrow, unless
anyone has better ideas. Also, this patch requires the one I sent
previously. I probably should have sent them together. Oops.
Both look good to me thanks.

Testing is tricky.
Perhaps add SPEED_T_MAX to getlimits and
if $SPEED_T_MAX-1 is supported assume $SPEED_T_MAX is?
But that's an assumption.

I'm inclined to think this edge case is not worth testing.

cheers,
Padraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]