From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH 17/18] chardev: Rename WIN_CHARDEV to CHARDEV_WIN
Date: Thu, 10 Sep 2020 15:49:02 -0400 [thread overview]
Message-ID: <20200910194903.4104696-18-ehabkost@redhat.com> (raw)
In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com>
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/char-win.h | 2 +-
chardev/char-pipe.c | 2 +-
chardev/char-win.c | 14 +++++++-------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/chardev/char-win.h b/include/chardev/char-win.h
index 485521469c..0e718d60c4 100644
--- a/include/chardev/char-win.h
+++ b/include/chardev/char-win.h
@@ -44,7 +44,7 @@ typedef struct WinChardev WinChardev;
#define NRECVBUF 2048
#define TYPE_CHARDEV_WIN "chardev-win"
-DECLARE_INSTANCE_CHECKER(WinChardev, WIN_CHARDEV,
+DECLARE_INSTANCE_CHECKER(WinChardev, CHARDEV_WIN,
TYPE_CHARDEV_WIN)
void win_chr_set_file(Chardev *chr, HANDLE file, bool keep_open);
diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c
index fd12c9e63b..96854cfe99 100644
--- a/chardev/char-pipe.c
+++ b/chardev/char-pipe.c
@@ -43,7 +43,7 @@
static int win_chr_pipe_init(Chardev *chr, const char *filename,
Error **errp)
{
- WinChardev *s = WIN_CHARDEV(chr);
+ WinChardev *s = CHARDEV_WIN(chr);
OVERLAPPED ov;
int ret;
DWORD size;
diff --git a/chardev/char-win.c b/chardev/char-win.c
index d4fb44c4dc..39cfd12177 100644
--- a/chardev/char-win.c
+++ b/chardev/char-win.c
@@ -30,7 +30,7 @@
static void win_chr_read(Chardev *chr, DWORD len)
{
- WinChardev *s = WIN_CHARDEV(chr);
+ WinChardev *s = CHARDEV_WIN(chr);
int max_size = qemu_chr_be_can_write(chr);
int ret, err;
uint8_t buf[CHR_READ_BUF_LEN];
@@ -61,7 +61,7 @@ static void win_chr_read(Chardev *chr, DWORD len)
static int win_chr_serial_poll(void *opaque)
{
Chardev *chr = CHARDEV(opaque);
- WinChardev *s = WIN_CHARDEV(opaque);
+ WinChardev *s = CHARDEV_WIN(opaque);
COMSTAT status;
DWORD comerr;
@@ -75,7 +75,7 @@ static int win_chr_serial_poll(void *opaque)
int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp)
{
- WinChardev *s = WIN_CHARDEV(chr);
+ WinChardev *s = CHARDEV_WIN(chr);
COMMCONFIG comcfg;
COMMTIMEOUTS cto = { 0, 0, 0, 0, 0};
COMSTAT comstat;
@@ -142,7 +142,7 @@ int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp)
int win_chr_pipe_poll(void *opaque)
{
Chardev *chr = CHARDEV(opaque);
- WinChardev *s = WIN_CHARDEV(opaque);
+ WinChardev *s = CHARDEV_WIN(opaque);
DWORD size;
PeekNamedPipe(s->file, NULL, 0, NULL, &size, NULL);
@@ -156,7 +156,7 @@ int win_chr_pipe_poll(void *opaque)
/* Called with chr_write_lock held. */
static int win_chr_write(Chardev *chr, const uint8_t *buf, int len1)
{
- WinChardev *s = WIN_CHARDEV(chr);
+ WinChardev *s = CHARDEV_WIN(chr);
DWORD len, ret, size, err;
len = len1;
@@ -192,7 +192,7 @@ static int win_chr_write(Chardev *chr, const uint8_t *buf, int len1)
static void char_win_finalize(Object *obj)
{
Chardev *chr = CHARDEV(obj);
- WinChardev *s = WIN_CHARDEV(chr);
+ WinChardev *s = CHARDEV_WIN(chr);
if (s->hsend) {
CloseHandle(s->hsend);
@@ -214,7 +214,7 @@ static void char_win_finalize(Object *obj)
void win_chr_set_file(Chardev *chr, HANDLE file, bool keep_open)
{
- WinChardev *s = WIN_CHARDEV(chr);
+ WinChardev *s = CHARDEV_WIN(chr);
s->keep_open = keep_open;
s->file = file;
--
2.26.2
next prev parent reply other threads:[~2020-09-10 19:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 19:48 [PATCH 00/18] chardev: QOM cleanups Eduardo Habkost
2020-09-10 19:48 ` [PATCH 01/18] chardev: Move PARALLEL_CHARDEV macro to common code Eduardo Habkost
2020-09-10 19:48 ` [PATCH 02/18] chardev: Move ParallelChardev typedef " Eduardo Habkost
2020-09-10 19:48 ` [PATCH 03/18] chardev: Use DECLARE_INSTANCE_CHECKER macro for PARALLEL_CHARDEV Eduardo Habkost
2020-09-10 19:48 ` [PATCH 04/18] chardev: Rename MOUSE_CHARDEV to CHARDEV_MSMOUSE Eduardo Habkost
2020-09-10 19:48 ` [PATCH 05/18] chardev: Rename BAUM_CHARDEV to CHARDEV_BRAILLE Eduardo Habkost
2020-09-10 19:48 ` [PATCH 06/18] chardev: Rename FD_CHARDEV to CHARDEV_FD Eduardo Habkost
2020-09-10 19:48 ` [PATCH 07/18] chardev: Rename MUX_CHARDEV to CHARDEV_MUX Eduardo Habkost
2020-09-10 19:48 ` [PATCH 08/18] chardev: Rename PARALLEL_CHARDEV to CHARDEV_PARALLEL Eduardo Habkost
2020-09-10 19:48 ` [PATCH 09/18] chardev: Rename PTY_CHARDEV to CHARDEV_PTY Eduardo Habkost
2020-09-10 19:48 ` [PATCH 10/18] chardev: Rename RINGBUF_CHARDEV to CHARDEV_RINGBUF Eduardo Habkost
2020-09-10 19:48 ` [PATCH 11/18] chardev: Rename SOCKET_CHARDEV to CHARDEV_SOCKET Eduardo Habkost
2020-09-10 19:48 ` [PATCH 12/18] chardev: Rename SPICE_CHARDEV to CHARDEV_SPICE Eduardo Habkost
2020-09-10 19:48 ` [PATCH 13/18] chardev: Rename TESTDEV_CHARDEV to CHARDEV_TESTDEV Eduardo Habkost
2020-09-10 19:48 ` [PATCH 14/18] chardev: Rename UDP_CHARDEV to CHARDEV_UDP Eduardo Habkost
2020-09-10 19:49 ` [PATCH 15/18] chardev: Rename VC_CHARDEV to CHARDEV_VC Eduardo Habkost
2020-09-10 19:49 ` [PATCH 16/18] chardev: Rename WCTABLET_CHARDEV to CHARDEV_WCTABLET Eduardo Habkost
2020-09-10 19:49 ` Eduardo Habkost [this message]
2020-09-10 19:49 ` [PATCH 18/18] chardev: Rename WIN_STDIO_CHARDEV to CHARDEV_WIN_STDIO Eduardo Habkost
2020-09-11 8:07 ` [PATCH 00/18] chardev: QOM cleanups Marc-André Lureau
2020-09-11 8:10 ` Daniel P. Berrangé
2020-09-11 8:19 ` Marc-André Lureau
2020-09-11 8:32 ` Daniel P. Berrangé
2020-09-11 13:50 ` Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200910194903.4104696-18-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@ens-lyon.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).