qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/5] gtk: Fix -serial vc


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 3/5] gtk: Fix -serial vc
Date: Fri, 25 Apr 2014 14:11:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

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 <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]