[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/18] chardev: Rename SPICE_CHARDEV to CHARDEV_SPICE
From: |
Eduardo Habkost |
Subject: |
[PATCH 12/18] chardev: Rename SPICE_CHARDEV to CHARDEV_SPICE |
Date: |
Thu, 10 Sep 2020 15:48:57 -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>
---
include/chardev/spice.h | 2 +-
chardev/spice.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/chardev/spice.h b/include/chardev/spice.h
index 99f26aedde..a48146d2c1 100644
--- a/include/chardev/spice.h
+++ b/include/chardev/spice.h
@@ -21,7 +21,7 @@ typedef struct SpiceChardev SpiceChardev;
#define TYPE_CHARDEV_SPICEVMC "chardev-spicevmc"
#define TYPE_CHARDEV_SPICEPORT "chardev-spiceport"
-DECLARE_INSTANCE_CHECKER(SpiceChardev, SPICE_CHARDEV,
+DECLARE_INSTANCE_CHECKER(SpiceChardev, CHARDEV_SPICE,
TYPE_CHARDEV_SPICE)
void qemu_chr_open_spice_port(Chardev *chr, ChardevBackend *backend,
diff --git a/chardev/spice.c b/chardev/spice.c
index bf7ea1e294..90a6a55626 100644
--- a/chardev/spice.c
+++ b/chardev/spice.c
@@ -173,7 +173,7 @@ static GSourceFuncs SpiceCharSourceFuncs = {
static GSource *spice_chr_add_watch(Chardev *chr, GIOCondition cond)
{
- SpiceChardev *scd = SPICE_CHARDEV(chr);
+ SpiceChardev *scd = CHARDEV_SPICE(chr);
SpiceCharSource *src;
assert(cond & G_IO_OUT);
@@ -187,7 +187,7 @@ static GSource *spice_chr_add_watch(Chardev *chr,
GIOCondition cond)
static int spice_chr_write(Chardev *chr, const uint8_t *buf, int len)
{
- SpiceChardev *s = SPICE_CHARDEV(chr);
+ SpiceChardev *s = CHARDEV_SPICE(chr);
int read_bytes;
assert(s->datalen == 0);
@@ -212,7 +212,7 @@ static int spice_chr_write(Chardev *chr, const uint8_t
*buf, int len)
static void char_spice_finalize(Object *obj)
{
- SpiceChardev *s = SPICE_CHARDEV(obj);
+ SpiceChardev *s = CHARDEV_SPICE(obj);
vmc_unregister_interface(s);
@@ -224,7 +224,7 @@ static void char_spice_finalize(Object *obj)
static void spice_vmc_set_fe_open(struct Chardev *chr, int fe_open)
{
- SpiceChardev *s = SPICE_CHARDEV(chr);
+ SpiceChardev *s = CHARDEV_SPICE(chr);
if (fe_open) {
vmc_register_interface(s);
} else {
@@ -234,7 +234,7 @@ static void spice_vmc_set_fe_open(struct Chardev *chr, int
fe_open)
static void spice_port_set_fe_open(struct Chardev *chr, int fe_open)
{
- SpiceChardev *s = SPICE_CHARDEV(chr);
+ SpiceChardev *s = CHARDEV_SPICE(chr);
if (fe_open) {
spice_server_port_event(&s->sin, SPICE_PORT_EVENT_OPENED);
@@ -245,14 +245,14 @@ static void spice_port_set_fe_open(struct Chardev *chr,
int fe_open)
static void spice_chr_accept_input(struct Chardev *chr)
{
- SpiceChardev *s = SPICE_CHARDEV(chr);
+ SpiceChardev *s = CHARDEV_SPICE(chr);
spice_server_char_device_wakeup(&s->sin);
}
static void chr_open(Chardev *chr, const char *subtype)
{
- SpiceChardev *s = SPICE_CHARDEV(chr);
+ SpiceChardev *s = CHARDEV_SPICE(chr);
s->active = false;
s->sin.subtype = g_strdup(subtype);
@@ -313,7 +313,7 @@ void qemu_chr_open_spice_port(Chardev *chr,
chr_open(chr, "port");
*be_opened = false;
- s = SPICE_CHARDEV(chr);
+ s = CHARDEV_SPICE(chr);
s->sin.portname = g_strdup(name);
if (using_spice) {
--
2.26.2
- [PATCH 02/18] chardev: Move ParallelChardev typedef to common code, (continued)
- [PATCH 02/18] chardev: Move ParallelChardev typedef to common code, Eduardo Habkost, 2020/09/10
- [PATCH 03/18] chardev: Use DECLARE_INSTANCE_CHECKER macro for PARALLEL_CHARDEV, Eduardo Habkost, 2020/09/10
- [PATCH 04/18] chardev: Rename MOUSE_CHARDEV to CHARDEV_MSMOUSE, Eduardo Habkost, 2020/09/10
- [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 <=
- [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, 2020/09/10
- [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