On 12/23/2014 01:48 PM, enh wrote:
> On Tue, Dec 23, 2014 at 11:44 AM, Rich Felker <[email protected]> wrote:
>> On Tue, Dec 23, 2014 at 10:23:43AM -0600, Rob Landley wrote:
>>>
>>>
>>> On 12/22/2014 11:37 PM, Rich Felker wrote:
>>>> On Mon, Dec 22, 2014 at 10:21:26PM -0600, Rob Landley wrote:
>>>>> If "less" is a priority, that actually helps prioritize the rest of
>>>>> them. Once I've written the basic "navigate a line" infrastructure (with
>>>>> querying screen size via ansi probe fallback, and reassembling escape
>>>>> sequences that got decoupled going over serial line; I fixed both of
>>>>> these in busybox several years ago), then stacking them isn't quite as
>>>>> big a deal.
>>>>
>>>> I hope you'll have an option just to rely on TIOCGWINSZ. The escapes
>>>> that cause the terminal to "echo back" a response are considered a
>>>> security misdesign by some people (myself included) and they're also
>>>> problematic from the standpoint that you don't know if they'll be
>>>> supported and that you can't distinguish between a terminal that
>>>> doesn't support them and one which is just slow to respond. I realize
>>>> you don't have any other option on serial terminals, but thankfully
>>>> lots of us don't have to deal with serial terminals.
>>>
>>> Lots of us _do_ have to deal with serial terminals.
>>
>> Yes, I know.
>>
>>> If you export $ROWS and $COLUMNS it'll do that instead of probe, and I
>>> can add a compile-time config symbol to switch it off if you care that much.
>>
>> Exporting ROWS and COLUMNS precludes runtime size changes though. The
>> correct way to handle size is TIOCGWINSZ. Perhaps you could use
>> TIOCGWINSZ for device numbers that indicate virtual terminal or pty
>> and only fall back to the ugly methods for serial ports?
> 
> annoyingly, adb (Android Debug Bridge) doesn't currently pass window
> size changes through, so until someone fixes that Android users count
> as serial port users too :-(

And the qemu -nographic option hooks serial up to stdin and stdout of
the qemu process, which is a very convenient place to park /dev/console.

And my sh2-on-a-stick xylinx fpga device (and my armv4t on a stick "tin
can tools nail board") both have serial consoles. Even though both are
USB plugging straight into the computer and powered by it, they care
what baud rate you set them to. (Really! Not just emulated serial,
there's apparently a full milimeter of wire in there somewhere that an
actual serial signal is going down.)

Rob
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to