qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] How do I disable -curses mode?
@ 2009-10-08  8:03 Rob Landley
  2009-10-09  5:15 ` Rob Landley
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Landley @ 2009-10-08  8:03 UTC (permalink / raw)
  To: qemu-devel

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 
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] How do I disable -curses mode?
  2009-10-08  8:03 [Qemu-devel] How do I disable -curses mode? Rob Landley
@ 2009-10-09  5:15 ` Rob Landley
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Landley @ 2009-10-09  5:15 UTC (permalink / raw)
  To: qemu-devel

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
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-09  5:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08  8:03 [Qemu-devel] How do I disable -curses mode? Rob Landley
2009-10-09  5:15 ` Rob Landley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).