[syslinux] com32: \n to \r\n?

Ferenc Wagner wferi at niif.hu
Tue Jun 24 14:24:21 PDT 2008


"H. Peter Anvin" <hpa at zytor.com> writes:

> Ferenc Wagner wrote:
>
>> I wonder if CRLF conversion should be done in the com32 library.
>> com32/modules is full of standard C printf("...\n") statements, which
>> display OK on VGA but produce staircase effect over a serial
>> connection.  The core terminates each line with CRLF, which comes out
>> OK in both cases.  I patched mboot.c to make its output readable, and
>> could do so with the other modules as well, but is that really the
>> right direction?  I hope the concept of binary/ASCII open modes will
>> not be introduced in Syslinux...
>
> Hm, I thought that was already being done.  You say this is the case
> for mboot.c32.  It uses console_ansi_std(), which is not used all that
> much -- that might be the source of the problem.

Funny I overlooked that eg. sanboot indeed behaves correctly.

> *Look deeper*
>
> Okay, in menu system I have used the ANSI escape code to convert \n ->
> \r\n on the *client side*, but mboot.c32 not actually using the ANSI
> engine it requested, doesn't emit it and doesn't do the right things.
> I did this way back before I actually filtered serial output; it was
> almost certainly a bad idea.

What kind of filtering does serial output go through now?
Do you mean those "\1# sequences" or something else?

> It's not like newline is particularly useful by itself.  There is a
> CSI sequence for moving the cursor down if needed.
>
> Want to try this patch out for me?

Yes, very much. . . . . If fixes both fancyhello and mboot!  Meanwhile
it doesn't seem to break sanboot or reset.  I like it. :)
-- 
Thanks,
Feri.

Ps: If only we got tenth of this support from some well established
vendors we pay serious $$$!  Amazing.




More information about the Syslinux mailing list