How do I disable -curses mode?
I'm running qemu -nographic from a script, booting up a linux -kernel with a serial console and driving it via "expect" to feed data to its stdin and parse its output.
This worked fine under 0.10.0, but under 0.11.0 it craps curses escape sequences all over the place, ala:
Type exit when done.
/ # #
^[[24;5R/ # # Show free space
/ # df
^[[24;13R^[[24;5RFilesystem 1K-blocks Used Available Use%
Mounted on
This confuses "expect" because it doesn't get the lines it's looking for, those escape sequences can show up in the middle of a line.
I'm already saying -nographic, which vl.c seems to imply is a different code path from -curses, yet it's spitting all this extra stuff to the output anyway.
If I recompile telling ./configure to --disable-curses the problem goes away, but I can't tell distro maintainers to do that and I can't always build qemu from source.
In this instance neither qemu's stdin nor its stdout is a tty, so you'd think the curses code would NOTICE. (It's not that hard to call ttyname() on stdin and see if you get a null pointer, is it?)
Rob
Signature · 1 line
Latency is more important than throughput. It's that simple. - Linus Torvalds
Quoted 6 lines · On Thursday 08 October 2009 03:03:25 Rob Landley wrote:
I'm running qemu -nographic from a script, booting up a linux -kernel with a serial console and driving it via "expect" to feed data to its stdin and parse its output.
This worked fine under 0.10.0, but under 0.11.0 it craps curses escape sequences all over the place, ala:
Nevermind, the curses issue got fixed during the development series. The escape sequences I was still seeing were busybox ash trying to query the TTY size at the other end of the serial console. (That I can work around easily enough, and are deterministically placed anyway.)
My bad, carry on. :)
Rob
Signature · 1 line
Latency is more important than throughput. It's that simple. - Linus Torvalds