aboutsummaryrefslogtreecommitdiff
path: root/backends/testdev.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-09-29 15:33:42 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-10-19 10:06:09 +0200
commit0498790173e462ac3a7e4e0f3608704b8382dd10 (patch)
tree986421c82cbf36f12a7916fe10bf945f46e3c958 /backends/testdev.c
parente47666b8d1f0a7043d53671587058b3ce539b09d (diff)
qemu-char: convert testdev backend to data-driven creation
Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'backends/testdev.c')
-rw-r--r--backends/testdev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/backends/testdev.c b/backends/testdev.c
index 43787f689f..26d5c7307a 100644
--- a/backends/testdev.c
+++ b/backends/testdev.c
@@ -108,7 +108,10 @@ static void testdev_close(struct CharDriverState *chr)
g_free(testdev);
}
-CharDriverState *chr_testdev_init(void)
+static CharDriverState *chr_testdev_init(const char *id,
+ ChardevBackend *backend,
+ ChardevReturn *ret,
+ Error **errp)
{
TestdevCharState *testdev;
CharDriverState *chr;
@@ -126,7 +129,7 @@ CharDriverState *chr_testdev_init(void)
static void register_types(void)
{
register_char_driver("testdev", CHARDEV_BACKEND_KIND_TESTDEV, NULL,
- NULL);
+ chr_testdev_init);
}
type_init(register_types);