[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] make -qmp stdio usable
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] make -qmp stdio usable |
Date: |
Mon, 23 Aug 2010 08:22:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5 |
On 08/22/2010 11:50 PM, Anthony Liguori wrote:
On 08/11/2010 04:56 PM, Paolo Bonzini wrote:
Currently -qmp stdio (or the equivalent -mon/-chardev combination) sets
up the terminal attributes even though it does not go through readline
to actually do I/O. As a result, echo is disabled and you cannot see
anything you type. This patch fixes it by adding a "cooked" option to
the stdio chardev backend, that when set will disable switching the tty
to raw mode.
cooked doesn't make a whole lot of sense to me (and it's not documented
anywhere).
"Cooked mode" is actually pretty common when talking about the Unix
TTYs, I can find it for example in curses documentation:
Normally, the tty driver buffers typed characters until a
newline or carriage return is typed. The cbreak routine disables
line buffering and erase/kill character-processing (interrupt and
flow control characters are unaffected), making characters typed by
the user immediately available to the program. The nocbreak
routine returns the terminal to normal (cooked) mode.
Maybe raw=on|off or even echo=on|off would make more sense?
raw would make sense, echo was my first choice but it has the problem
that echo is done anyway when Qemu's readline is involved.
I'll redo the patch with raw.
Paolo