From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, eblake@redhat.com,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PATCH 17/40] char: rename remaining CharDriver to Chardev
Date: Wed, 11 Jan 2017 18:29:33 +0100 [thread overview]
Message-ID: <20170111172956.11255-18-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20170111172956.11255-1-marcandre.lureau@redhat.com>
CharDriver no longer exists, it has been replaced with Chardev.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
include/sysemu/char.h | 40 ++++++++++++++++++++--------------------
qemu-char.c | 12 ++++++------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/include/sysemu/char.h b/include/sysemu/char.h
index 2a3b887b8a..b4303e7b22 100644
--- a/include/sysemu/char.h
+++ b/include/sysemu/char.h
@@ -74,7 +74,7 @@ typedef enum {
QEMU_CHAR_FEATURE_REPLAY,
QEMU_CHAR_FEATURE_LAST,
-} CharDriverFeature;
+} ChardevFeature;
/* This is the backend as seen by frontend, the actual backend is
* Chardev */
@@ -141,7 +141,7 @@ Chardev *qemu_chr_new(const char *label, const char *filename);
* @qemu_chr_fe_disconnect:
*
* Close a fd accpeted by character backend.
- * Without associated CharDriver, do nothing.
+ * Without associated Chardev, do nothing.
*/
void qemu_chr_fe_disconnect(CharBackend *be);
@@ -156,7 +156,7 @@ void qemu_chr_cleanup(void);
* @qemu_chr_fe_wait_connected:
*
* Wait for characted backend to be connected, return < 0 on error or
- * if no assicated CharDriver.
+ * if no assicated Chardev.
*/
int qemu_chr_fe_wait_connected(CharBackend *be, Error **errp);
@@ -188,7 +188,7 @@ void qemu_chr_delete(Chardev *chr);
* Ask the backend to override its normal echo setting. This only really
* applies to the stdio backend and is used by the QMP server such that you
* can see what you type if you try to type QMP commands.
- * Without associated CharDriver, do nothing.
+ * Without associated Chardev, do nothing.
*
* @echo true to enable echo, false to disable echo
*/
@@ -199,7 +199,7 @@ void qemu_chr_fe_set_echo(CharBackend *be, bool echo);
*
* Set character frontend open status. This is an indication that the
* front end is ready (or not) to begin doing I/O.
- * Without associated CharDriver, do nothing.
+ * Without associated Chardev, do nothing.
*/
void qemu_chr_fe_set_open(CharBackend *be, int fe_open);
@@ -208,7 +208,7 @@ void qemu_chr_fe_set_open(CharBackend *be, int fe_open);
*
* Write to a character backend using a printf style interface. This
* function is thread-safe. It does nothing without associated
- * CharDriver.
+ * Chardev.
*
* @fmt see #printf
*/
@@ -221,7 +221,7 @@ void qemu_chr_fe_printf(CharBackend *be, const char *fmt, ...)
* If the backend is connected, create and add a #GSource that fires
* when the given condition (typically G_IO_OUT|G_IO_HUP or G_IO_HUP)
* is active; return the #GSource's tag. If it is disconnected,
- * or without associated CharDriver, return 0.
+ * or without associated Chardev, return 0.
*
* @cond the condition to poll for
* @func the function to call when the condition happens
@@ -242,7 +242,7 @@ guint qemu_chr_fe_add_watch(CharBackend *be, GIOCondition cond,
* @buf the data
* @len the number of bytes to send
*
- * Returns: the number of bytes consumed (0 if no assicated CharDriver)
+ * Returns: the number of bytes consumed (0 if no assicated Chardev)
*/
int qemu_chr_fe_write(CharBackend *be, const uint8_t *buf, int len);
@@ -257,7 +257,7 @@ int qemu_chr_fe_write(CharBackend *be, const uint8_t *buf, int len);
* @buf the data
* @len the number of bytes to send
*
- * Returns: the number of bytes consumed (0 if no assicated CharDriver)
+ * Returns: the number of bytes consumed (0 if no assicated Chardev)
*/
int qemu_chr_fe_write_all(CharBackend *be, const uint8_t *buf, int len);
@@ -269,7 +269,7 @@ int qemu_chr_fe_write_all(CharBackend *be, const uint8_t *buf, int len);
* @buf the data buffer
* @len the number of bytes to read
*
- * Returns: the number of bytes read (0 if no assicated CharDriver)
+ * Returns: the number of bytes read (0 if no assicated Chardev)
*/
int qemu_chr_fe_read_all(CharBackend *be, uint8_t *buf, int len);
@@ -282,7 +282,7 @@ int qemu_chr_fe_read_all(CharBackend *be, uint8_t *buf, int len);
* @arg the data associated with @cmd
*
* Returns: if @cmd is not supported by the backend or there is no
- * associated CharDriver, -ENOTSUP, otherwise the return
+ * associated Chardev, -ENOTSUP, otherwise the return
* value depends on the semantics of @cmd
*/
int qemu_chr_fe_ioctl(CharBackend *be, int cmd, void *arg);
@@ -322,7 +322,7 @@ int qemu_chr_fe_get_msgfds(CharBackend *be, int *fds, int num);
* result in overwriting the fd array with the new value without being send.
* Upon writing the message the fd array is freed.
*
- * Returns: -1 if fd passing isn't supported or no associated CharDriver.
+ * Returns: -1 if fd passing isn't supported or no associated Chardev.
*/
int qemu_chr_fe_set_msgfds(CharBackend *be, int *fds, int num);
@@ -373,7 +373,7 @@ void qemu_chr_be_event(Chardev *s, int event);
* @qemu_chr_fe_init:
*
* Initializes a front end for the given CharBackend and
- * CharDriver. Call qemu_chr_fe_deinit() to remove the association and
+ * Chardev. Call qemu_chr_fe_deinit() to remove the association and
* release the driver.
*
* Returns: false on error.
@@ -384,16 +384,16 @@ bool qemu_chr_fe_init(CharBackend *b, Chardev *s, Error **errp);
* @qemu_chr_fe_get_driver:
*
* Returns the driver associated with a CharBackend or NULL if no
- * associated CharDriver.
+ * associated Chardev.
*/
Chardev *qemu_chr_fe_get_driver(CharBackend *be);
/**
* @qemu_chr_fe_deinit:
*
- * Dissociate the CharBackend from the CharDriver.
+ * Dissociate the CharBackend from the Chardev.
*
- * Safe to call without associated CharDriver.
+ * Safe to call without associated Chardev.
*/
void qemu_chr_fe_deinit(CharBackend *b);
@@ -412,7 +412,7 @@ void qemu_chr_fe_deinit(CharBackend *b);
* Set the front end char handlers. The front end takes the focus if
* any of the handler is non-NULL.
*
- * Without associated CharDriver, nothing is changed.
+ * Without associated Chardev, nothing is changed.
*/
void qemu_chr_fe_set_handlers(CharBackend *b,
IOCanReadHandler *fd_can_read,
@@ -427,7 +427,7 @@ void qemu_chr_fe_set_handlers(CharBackend *b,
*
* Take the focus (if the front end is muxed).
*
- * Without associated CharDriver, nothing is changed.
+ * Without associated Chardev, nothing is changed.
*/
void qemu_chr_fe_take_focus(CharBackend *b);
@@ -437,9 +437,9 @@ int qemu_chr_add_client(Chardev *s, int fd);
Chardev *qemu_chr_find(const char *name);
bool qemu_chr_has_feature(Chardev *chr,
- CharDriverFeature feature);
+ ChardevFeature feature);
void qemu_chr_set_feature(Chardev *chr,
- CharDriverFeature feature);
+ ChardevFeature feature);
QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename);
#define TYPE_CHARDEV "chardev"
diff --git a/qemu-char.c b/qemu-char.c
index c003223e48..1ce3b80b5c 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3171,13 +3171,13 @@ typedef struct {
Chardev *chr;
char buf[12];
size_t buflen;
-} TCPCharDriverTelnetInit;
+} TCPChardevTelnetInit;
static gboolean tcp_chr_telnet_init_io(QIOChannel *ioc,
GIOCondition cond G_GNUC_UNUSED,
gpointer user_data)
{
- TCPCharDriverTelnetInit *init = user_data;
+ TCPChardevTelnetInit *init = user_data;
ssize_t ret;
ret = qio_channel_write(ioc, init->buf, init->buflen, NULL);
@@ -3204,8 +3204,8 @@ static gboolean tcp_chr_telnet_init_io(QIOChannel *ioc,
static void tcp_chr_telnet_init(Chardev *chr)
{
SocketChardev *s = SOCKET_CHARDEV(chr);
- TCPCharDriverTelnetInit *init =
- g_new0(TCPCharDriverTelnetInit, 1);
+ TCPChardevTelnetInit *init =
+ g_new0(TCPChardevTelnetInit, 1);
size_t n = 0;
init->chr = chr;
@@ -4967,13 +4967,13 @@ static const TypeInfo char_udp_type_info = {
};
bool qemu_chr_has_feature(Chardev *chr,
- CharDriverFeature feature)
+ ChardevFeature feature)
{
return test_bit(feature, chr->features);
}
void qemu_chr_set_feature(Chardev *chr,
- CharDriverFeature feature)
+ ChardevFeature feature)
{
return set_bit(feature, chr->features);
}
--
2.11.0
next prev parent reply other threads:[~2017-01-11 17:30 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 17:29 [Qemu-devel] [PATCH 00/40] chardev: qom clean-up and split in various backend files Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 01/40] spice-qemu-char: convert to finalize Marc-André Lureau
2017-01-11 19:52 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 02/40] baum: " Marc-André Lureau
2017-01-11 19:55 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 03/40] msmouse: " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 04/40] mux: " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 05/40] char-udp: " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 06/40] char-socket: " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 07/40] char-pty: " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 08/40] char-ringbuf: " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 09/40] char-parallel: convert parallel " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 10/40] char-stdio: convert " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 11/40] char-win-stdio: " Marc-André Lureau
2017-01-11 20:20 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 12/40] char-win: do not override chr_free Marc-André Lureau
2017-01-11 20:22 ` Eric Blake
2017-01-12 15:14 ` Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 13/40] char-win: convert to finalize Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 14/40] char-fd: " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 15/40] char: remove chr_free Marc-André Lureau
2017-01-11 20:27 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 16/40] char: get rid of CharDriver Marc-André Lureau
2017-01-11 21:33 ` Eric Blake
2017-01-12 16:14 ` Marc-André Lureau
2017-01-11 17:29 ` Marc-André Lureau [this message]
2017-01-12 17:16 ` [Qemu-devel] [PATCH 17/40] char: rename remaining CharDriver to Chardev Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 18/40] char: remove class kind field Marc-André Lureau
2017-01-12 18:32 ` Eric Blake
2017-01-13 15:23 ` Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 19/40] char: move to chardev/ Marc-André Lureau
2017-01-12 19:06 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 20/40] char: create chardev-obj-y Marc-André Lureau
2017-01-12 21:47 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 21/40] char: make null_chr_write() the default method Marc-André Lureau
2017-01-12 22:42 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 22/40] char: move null chardev to its own file Marc-André Lureau
2017-01-12 22:44 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 23/40] char: move mux " Marc-André Lureau
2017-01-12 23:06 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 24/40] char: move ringbuf/memory " Marc-André Lureau
2017-01-12 23:13 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 25/40] char: rename and move to header CHR_READ_BUF_LEN Marc-André Lureau
2017-01-12 23:13 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 26/40] char: remove unused READ_RETRIES Marc-André Lureau
2017-01-12 23:14 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 27/40] char: move QIOChannel-related in char-io.h Marc-André Lureau
2017-01-12 23:26 ` Eric Blake
2017-01-13 16:42 ` Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 28/40] char: move fd chardev in its own file Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 29/40] char: move win chardev base class " Marc-André Lureau
2017-01-13 19:51 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 30/40] char: move win-stdio into " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 31/40] char: move socket chardev to " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 32/40] char: move udp chardev in " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 33/40] char: move file " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 34/40] char: move stdio " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 35/40] char: move console " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 36/40] char: move pipe chardev " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 37/40] char: move pty " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 38/40] char: move serial chardev to itw " Marc-André Lureau
2017-01-11 17:29 ` [Qemu-devel] [PATCH 39/40] char: move parallel chardev in its " Marc-André Lureau
2017-01-13 19:54 ` Eric Blake
2017-01-11 17:29 ` [Qemu-devel] [PATCH 40/40] char: headers clean-up Marc-André Lureau
2017-01-13 19:52 ` Eric Blake
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=20170111172956.11255-18-marcandre.lureau@redhat.com \
--to=marcandre.lureau@redhat.com \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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).