On Fri, Nov 29, 2013 at 11:13:41AM +0100, Kevin Wolf wrote: > Am 29.11.2013 um 11:04 hat Kevin Wolf geschrieben: > > Am 14.11.2013 um 11:54 hat Stefan Hajnoczi geschrieben: > > > Using stdin with readline.c requires disabling echo and line buffering. > > > Add a portable wrapper to set the terminal attributes under Linux and > > > Windows. > > > > > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > > > > There's already qemu_chr_fe_set_echo(). Can't we use that? Changing this > > setting outside the context of a chardev feels wrong anyway. > > Okay, I see, tools don't have chardevs, unfortunately. But can we avoid > duplication the other way round then, that is, let qemu-char.c use the > new functions? They don't seem to be exactly the same, so I'm not > completely sure if they are supposed to do different things or if they > are just buggy in different ways.
I didn't see a nice way of doing that. The chardev approach is a little different - it tries to restore termios on shutdown by stashing it in a global variable.