[syslinux] COM32: console_ansi_raw() and later segfaults
H. Peter Anvin
hpa at zytor.com
Mon Dec 8 20:19:10 PST 2008
Gene Cumm wrote:
> For the read-only shell that I'm working on, I'm running into a slight
> snag. I'm trying to build a paging command (emulating the function of
> more). It seems get_key() is probably the best function to use for
> obtaining just a single key sequence. On my first run, I tried to
> call console_ansi_raw(), then get_key() then console_ansi_std() to
> change it back to a more normal mode. When I then attempt to use
> fgets() (in Linux, not syslinux/com32), it segfaults.
>
> I then decided to try just tweaking the two local flag bits, ICANON
> and ECHO and it works fine for Linux but now I'm going to have to
> write alternate code for the COM32 build, probably by writing a pair
> of functions to change modes.
>
> The question is what should I be doing in order to be more compatible
> with both Linux and COM32? Are my initial thoughts completely in the
> wrong direction?
>
There are some functions in the libutil directory, but I'm not sure if
there is anything there that switches mode like you want. Let me check
tomorrow.
-hpa
More information about the Syslinux
mailing list