aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-02-21 11:39:12 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-03-13 10:27:45 +0100
commit2c5f488293c7d0cd095635c74157c2526e2c4947 (patch)
treeab39a41324c9634bb1240a4414ac2b960d6cee3d /include
parent8ca761f661a7cc972bc6bcf938feca6c538100f0 (diff)
chardev: add support for qapi-based chardev initialization
This patch add support for a new way to initialize chardev devices. Instead of calling a initialization function with a QemuOpts we will now create a (qapi) ChardevBackend, optionally call a function to fill ChardevBackend from QemuOpts, then go create the chardev using the new qapi code path which is also used by chardev-add. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/char/char.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/char/char.h b/include/char/char.h
index 2e24270895..afe002498e 100644
--- a/include/char/char.h
+++ b/include/char/char.h
@@ -245,6 +245,8 @@ CharDriverState *qemu_chr_find(const char *name);
QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename);
void register_char_driver(const char *name, CharDriverState *(*open)(QemuOpts *));
+void register_char_driver_qapi(const char *name, int kind,
+ void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp));
/* add an eventfd to the qemu devices that are polled */
CharDriverState *qemu_chr_open_eventfd(int eventfd);