From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54189 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnQQq-0007Rd-Pf for qemu-devel@nongnu.org; Mon, 23 Aug 2010 02:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnQQm-0005yw-H5 for qemu-devel@nongnu.org; Mon, 23 Aug 2010 02:22:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8917) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnQQm-0005yi-Aa for qemu-devel@nongnu.org; Mon, 23 Aug 2010 02:22:52 -0400 Message-ID: <4C7213B7.20007@redhat.com> Date: Mon, 23 Aug 2010 08:22:47 +0200 From: Paolo Bonzini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] make -qmp stdio usable References: <1281563766-19391-1-git-send-email-pbonzini@redhat.com> <4C719B8D.1010208@codemonkey.ws> In-Reply-To: <4C719B8D.1010208@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , qemu-devel@nongnu.org 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