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 <marcandre.lur...@redhat.com>
> ---

> +++ 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