[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 7/8] chardev: Reduce "char-mux.h" scope, rename it "chardev-intern
From: |
Marc-André Lureau |
Subject: |
[PULL 7/8] chardev: Reduce "char-mux.h" scope, rename it "chardev-internal.h" |
Date: |
Mon, 13 Jul 2020 12:24:23 +0400 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
No file out of chardev/ requires access to this header,
restrict its scope.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200423202112.644-5-philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
include/chardev/char-mux.h => chardev/chardev-internal.h | 7 ++++---
chardev/char-fe.c | 2 +-
chardev/char-mux.c | 2 +-
chardev/char.c | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
rename include/chardev/char-mux.h => chardev/chardev-internal.h (96%)
diff --git a/include/chardev/char-mux.h b/chardev/chardev-internal.h
similarity index 96%
rename from include/chardev/char-mux.h
rename to chardev/chardev-internal.h
index 417fe32eedf..e0264ac3498 100644
--- a/include/chardev/char-mux.h
+++ b/chardev/chardev-internal.h
@@ -1,5 +1,5 @@
/*
- * QEMU System Emulator
+ * QEMU Character device internals
*
* Copyright (c) 2003-2008 Fabrice Bellard
*
@@ -21,8 +21,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef CHAR_MUX_H
-#define CHAR_MUX_H
+#ifndef CHARDEV_INTERNAL_H
+#define CHARDEV_INTERNAL_H
#include "chardev/char.h"
#include "chardev/char-fe.h"
@@ -30,6 +30,7 @@
#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];
diff --git a/chardev/char-fe.c b/chardev/char-fe.c
index f3530a90e63..474715c5a92 100644
--- a/chardev/char-fe.c
+++ b/chardev/char-fe.c
@@ -29,7 +29,7 @@
#include "chardev/char-fe.h"
#include "chardev/char-io.h"
-#include "chardev/char-mux.h"
+#include "chardev-internal.h"
int qemu_chr_fe_write(CharBackend *be, const uint8_t *buf, int len)
{
diff --git a/chardev/char-mux.c b/chardev/char-mux.c
index 46c44af67c4..6f980bb8364 100644
--- a/chardev/char-mux.c
+++ b/chardev/char-mux.c
@@ -29,7 +29,7 @@
#include "chardev/char.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
-#include "chardev/char-mux.h"
+#include "chardev-internal.h"
/* MUX driver for serial I/O splitting */
diff --git a/chardev/char.c b/chardev/char.c
index a0626d04d50..807be52300e 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -40,7 +40,7 @@
#include "qemu/id.h"
#include "qemu/coroutine.h"
-#include "chardev/char-mux.h"
+#include "chardev-internal.h"
/***********************************************************/
/* character device */
--
2.27.0.221.ga08a83db2b
- [PULL 0/8] Chardev patches, Marc-André Lureau, 2020/07/13
- [PULL 1/8] char-socket: initialize reconnect timer only when the timer doesn't start, Marc-André Lureau, 2020/07/13
- [PULL 2/8] chardev: don't abort on attempt to add duplicated chardev, Marc-André Lureau, 2020/07/13
- [PULL 3/8] char: fix use-after-free with dup chardev & reconnect, Marc-André Lureau, 2020/07/13
- [PULL 4/8] monitor/misc: Remove unused "chardev/char-mux.h" include, Marc-André Lureau, 2020/07/13
- [PULL 5/8] tests/test-char: Remove unused "chardev/char-mux.h" include, Marc-André Lureau, 2020/07/13
- [PULL 6/8] chardev: Restrict msmouse / wctablet / testdev to system emulation, Marc-André Lureau, 2020/07/13
- [PULL 7/8] chardev: Reduce "char-mux.h" scope, rename it "chardev-internal.h",
Marc-André Lureau <=
- [PULL 8/8] chardev: Extract system emulation specific code, Marc-André Lureau, 2020/07/13
- Re: [PULL 0/8] Chardev patches, Peter Maydell, 2020/07/13