[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/18] chardev: Rename VC_CHARDEV to CHARDEV_VC
From: |
Eduardo Habkost |
Subject: |
[PATCH 15/18] chardev: Rename VC_CHARDEV to CHARDEV_VC |
Date: |
Thu, 10 Sep 2020 15:49:00 -0400 |
Rename instance and class type checkers to match the
TYPE_CHARDEV_* constant names and the QOM type name strings
("chardev-*").
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
ui/console.c | 10 +++++-----
ui/gtk.c | 8 ++++----
ui/spice-app.c | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index f8d7643fe4..37a7c4a713 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1090,12 +1090,12 @@ struct VCChardev {
typedef struct VCChardev VCChardev;
#define TYPE_CHARDEV_VC "chardev-vc"
-DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV,
+DECLARE_INSTANCE_CHECKER(VCChardev, CHARDEV_VC,
TYPE_CHARDEV_VC)
static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len)
{
- VCChardev *drv = VC_CHARDEV(chr);
+ VCChardev *drv = CHARDEV_VC(chr);
QemuConsole *s = drv->console;
int i;
@@ -2108,7 +2108,7 @@ int qemu_console_get_height(QemuConsole *con, int
fallback)
static void vc_chr_set_echo(Chardev *chr, bool echo)
{
- VCChardev *drv = VC_CHARDEV(chr);
+ VCChardev *drv = CHARDEV_VC(chr);
QemuConsole *s = drv->console;
s->echo = echo;
@@ -2148,7 +2148,7 @@ static const GraphicHwOps text_console_ops = {
static void text_console_do_init(Chardev *chr, DisplayState *ds)
{
- VCChardev *drv = VC_CHARDEV(chr);
+ VCChardev *drv = CHARDEV_VC(chr);
QemuConsole *s = drv->console;
int g_width = 80 * FONT_WIDTH;
int g_height = 24 * FONT_HEIGHT;
@@ -2205,7 +2205,7 @@ static void vc_chr_open(Chardev *chr,
Error **errp)
{
ChardevVC *vc = backend->u.vc.data;
- VCChardev *drv = VC_CHARDEV(chr);
+ VCChardev *drv = CHARDEV_VC(chr);
QemuConsole *s;
unsigned width = 0;
unsigned height = 0;
diff --git a/ui/gtk.c b/ui/gtk.c
index 1c59de2af4..30c607a412 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -179,7 +179,7 @@ struct VCChardev {
typedef struct VCChardev VCChardev;
#define TYPE_CHARDEV_VC "chardev-vc"
-DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV,
+DECLARE_INSTANCE_CHECKER(VCChardev, CHARDEV_VC,
TYPE_CHARDEV_VC)
bool gtk_use_gl_area;
@@ -1693,7 +1693,7 @@ static void gd_vc_adjustment_changed(GtkAdjustment
*adjustment, void *opaque)
static int gd_vc_chr_write(Chardev *chr, const uint8_t *buf, int len)
{
- VCChardev *vcd = VC_CHARDEV(chr);
+ VCChardev *vcd = CHARDEV_VC(chr);
VirtualConsole *vc = vcd->console;
vte_terminal_feed(VTE_TERMINAL(vc->vte.terminal), (const char *)buf, len);
@@ -1702,7 +1702,7 @@ static int gd_vc_chr_write(Chardev *chr, const uint8_t
*buf, int len)
static void gd_vc_chr_set_echo(Chardev *chr, bool echo)
{
- VCChardev *vcd = VC_CHARDEV(chr);
+ VCChardev *vcd = CHARDEV_VC(chr);
VirtualConsole *vc = vcd->console;
if (vc) {
@@ -1784,7 +1784,7 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s,
VirtualConsole *vc,
GtkWidget *box;
GtkWidget *scrollbar;
GtkAdjustment *vadjustment;
- VCChardev *vcd = VC_CHARDEV(chr);
+ VCChardev *vcd = CHARDEV_VC(chr);
vc->s = s;
vc->vte.echo = vcd->echo;
diff --git a/ui/spice-app.c b/ui/spice-app.c
index 93e105c6ee..e66c422e02 100644
--- a/ui/spice-app.c
+++ b/ui/spice-app.c
@@ -47,7 +47,7 @@ struct VCChardev {
typedef struct VCChardev VCChardev;
#define TYPE_CHARDEV_VC "chardev-vc"
-DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV,
+DECLARE_INSTANCE_CHECKER(VCChardev, CHARDEV_VC,
TYPE_CHARDEV_VC)
static ChardevBackend *
--
2.26.2
- [PATCH 05/18] chardev: Rename BAUM_CHARDEV to CHARDEV_BRAILLE, (continued)
- [PATCH 05/18] chardev: Rename BAUM_CHARDEV to CHARDEV_BRAILLE, Eduardo Habkost, 2020/09/10
- [PATCH 06/18] chardev: Rename FD_CHARDEV to CHARDEV_FD, Eduardo Habkost, 2020/09/10
- [PATCH 07/18] chardev: Rename MUX_CHARDEV to CHARDEV_MUX, Eduardo Habkost, 2020/09/10
- [PATCH 08/18] chardev: Rename PARALLEL_CHARDEV to CHARDEV_PARALLEL, Eduardo Habkost, 2020/09/10
- [PATCH 10/18] chardev: Rename RINGBUF_CHARDEV to CHARDEV_RINGBUF, Eduardo Habkost, 2020/09/10
- [PATCH 09/18] chardev: Rename PTY_CHARDEV to CHARDEV_PTY, Eduardo Habkost, 2020/09/10
- [PATCH 11/18] chardev: Rename SOCKET_CHARDEV to CHARDEV_SOCKET, Eduardo Habkost, 2020/09/10
- [PATCH 12/18] chardev: Rename SPICE_CHARDEV to CHARDEV_SPICE, Eduardo Habkost, 2020/09/10
- [PATCH 13/18] chardev: Rename TESTDEV_CHARDEV to CHARDEV_TESTDEV, Eduardo Habkost, 2020/09/10
- [PATCH 14/18] chardev: Rename UDP_CHARDEV to CHARDEV_UDP, Eduardo Habkost, 2020/09/10
- [PATCH 15/18] chardev: Rename VC_CHARDEV to CHARDEV_VC,
Eduardo Habkost <=
- [PATCH 16/18] chardev: Rename WCTABLET_CHARDEV to CHARDEV_WCTABLET, Eduardo Habkost, 2020/09/10
- [PATCH 17/18] chardev: Rename WIN_CHARDEV to CHARDEV_WIN, Eduardo Habkost, 2020/09/10
- [PATCH 18/18] chardev: Rename WIN_STDIO_CHARDEV to CHARDEV_WIN_STDIO, Eduardo Habkost, 2020/09/10
- Re: [PATCH 00/18] chardev: QOM cleanups, Marc-André Lureau, 2020/09/11