[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
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 21/40] char: make null_chr_write() the default method, (continued)
- [Qemu-devel] [PATCH 22/40] char: move null chardev to its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 20/40] char: create chardev-obj-y, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 19/40] char: move to chardev/, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 24/40] char: move ringbuf/memory to its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 23/40] char: move mux to its own file, Marc-André Lureau, 2017/01/11
- Re: [Qemu-devel] [PATCH 23/40] char: move mux to its own file,
Eric Blake <=
- [Qemu-devel] [PATCH 26/40] char: remove unused READ_RETRIES, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 25/40] char: rename and move to header CHR_READ_BUF_LEN, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 27/40] char: move QIOChannel-related in char-io.h, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 28/40] char: move fd chardev in its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 29/40] char: move win chardev base class in its own file, Marc-André Lureau, 2017/01/11