Am 24.04.2014 19:35, schrieb Cole Robinson: > Try kicking off a rhel5 text install over serial, the text menu navigation > is all messed up, and some of the kernel boot messages are randomly > corrupted. > > Drop use of a pty and just use vte infrastructure for reading and writing. > This fixes the above corruption, and is simpler to boot. > > (I don't know what was wrong with the original code though. FWIW this is > what virt-manager has done for years). > > Signed-off-by: Cole Robinson <crobi...@redhat.com> > --- > ui/gtk.c | 41 +++++++++-------------------------------- > 1 file changed, 9 insertions(+), 32 deletions(-) > > diff --git a/ui/gtk.c b/ui/gtk.c > index 816ef15..117b0eb 100644 > --- a/ui/gtk.c > +++ b/ui/gtk.c [...] > @@ -1194,18 +1196,11 @@ void early_gtk_display_init(void) > } > > #if defined(CONFIG_VTE) > -static gboolean gd_vc_in(GIOChannel *chan, GIOCondition cond, void *opaque) > +static gboolean gd_vc_in(VteTerminal *terminal, gchar *text, guint size, > + gpointer user_data) > { > - VirtualConsole *vc = opaque; > - uint8_t buffer[1024]; > - ssize_t len; > - > - len = read(vc->fd, buffer, sizeof(buffer)); > - if (len <= 0) { > - return FALSE; > - } > - > - qemu_chr_be_write(vc->chr, buffer, len); > + VirtualConsole *vc = user_data;
Gerd, can we retain the white line here please? :) Andreas > + qemu_chr_be_write(vc->chr, (uint8_t *)text, (unsigned int)size); > > return TRUE; > } [snip] -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg