aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-12-09 00:50:12 +0300
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-01-31 13:01:47 +0400
commit88cace9f119b85ac2d40a8b10c24e05ccfa6da07 (patch)
tree9aa623eb65581a78d3c1d910f2a787990260c1eb /include
parent8cddc46990ab0310af9fb148143326f832802fca (diff)
char: get rid of CharDriver
qemu_chr_new_from_opts() is modified to not need CharDriver backend[] array, but uses instead objectified qmp_query_chardev_backends() and char_get_class(). The alias field is moved outside in a ChardevAlias[], similar to QDevAlias for devices. "kind" and "parse" are moved to ChardevClass ("kind" is to be removed next) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/char.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/sysemu/char.h b/include/sysemu/char.h
index 5e5594f305..2a3b887b8a 100644
--- a/include/sysemu/char.h
+++ b/include/sysemu/char.h
@@ -88,8 +88,6 @@ typedef struct CharBackend {
int fe_open;
} CharBackend;
-typedef struct CharDriver CharDriver;
-
struct Chardev {
Object parent_obj;
@@ -476,6 +474,8 @@ typedef struct ChardevClass {
ObjectClass parent_class;
bool internal; /* TODO: eventually use TYPE_USER_CREATABLE */
+ ChardevBackendKind kind;
+ void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp);
void (*open)(Chardev *chr, ChardevBackend *backend,
bool *be_opened, Error **errp);
@@ -495,17 +495,9 @@ typedef struct ChardevClass {
void (*chr_set_fe_open)(Chardev *chr, int fe_open);
} ChardevClass;
-struct CharDriver {
- ChardevBackendKind kind;
- const char *alias;
- void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp);
-};
-
Chardev *qemu_chardev_new(const char *id, const char *typename,
ChardevBackend *backend, Error **errp);
-void register_char_driver(const CharDriver *driver);
-
extern int term_escape_char;
/* console.c */