qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 23/40] char: move mux to its own file


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 23/40] char: move mux to its own file
Date: Thu, 12 Jan 2017 17:06:22 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 01/11/2017 11:29 AM, Marc-André Lureau wrote:
> A mechanical move, except that qemu_chr_write_all() needs to be declared
> in char.h header to be used from chardev unit files.
> 
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---

> +++ b/chardev/char-mux.h
> @@ -0,0 +1,40 @@
> +#ifndef CHAR_MUX_H
> +#define CHAR_MUX_H

Again, missing copyright blurbs. You'll need to respin to get that
right, but I'll quit pointing it out.

> +
> +#include "sysemu/char.h"
> +
> +extern bool muxes_realized;
> +
> +#define MAX_MUX 4
> +#define MUX_BUFFER_SIZE 32 /* Must be a power of 2.  */
> +#define MUX_BUFFER_MASK (MUX_BUFFER_SIZE - 1)
> +typedef struct MuxChardev {
> +    Chardev parent;
> +    CharBackend *backends[MAX_MUX];
> +    CharBackend chr;
> +    int focus;
> +    int mux_cnt;
> +    int term_got_escape;
> +    int max_size;
> +    /* Intermediate input buffer allows to catch escape sequences even if the

s/allows to catch/catches/

Dunno if cleanups like that should be mixed with code motion, or done
separately.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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