diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-09-29 15:17:20 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-10-19 10:05:49 +0200 |
commit | e79b80daa252ffb4bc5c84c836714eb45ab3bb68 (patch) | |
tree | a01efb69335394ea2582baa32874a0e52ae9beb2 | |
parent | dbba8d1be3db5a52cfe200f219fbf8840d75cb14 (diff) |
qemu-char: convert UDP backend to data-driven creation
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | qemu-char.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/qemu-char.c b/qemu-char.c index d0de7ef025..de4d9d8cc8 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -4223,9 +4223,12 @@ static CharDriverState *qmp_chardev_open_socket(const char *id, return chr; } -static CharDriverState *qmp_chardev_open_udp(ChardevUdp *udp, +static CharDriverState *qmp_chardev_open_udp(const char *id, + ChardevBackend *backend, + ChardevReturn *ret, Error **errp) { + ChardevUdp *udp = backend->udp; int fd; fd = socket_dgram(udp->remote, udp->local, errp); @@ -4282,7 +4285,7 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend, abort(); break; case CHARDEV_BACKEND_KIND_UDP: - chr = qmp_chardev_open_udp(backend->udp, &local_err); + abort(); break; #ifdef HAVE_CHARDEV_PTY case CHARDEV_BACKEND_KIND_PTY: @@ -4397,7 +4400,7 @@ static void register_types(void) register_char_driver("socket", CHARDEV_BACKEND_KIND_SOCKET, qemu_chr_parse_socket, qmp_chardev_open_socket); register_char_driver("udp", CHARDEV_BACKEND_KIND_UDP, qemu_chr_parse_udp, - NULL); + qmp_chardev_open_udp); register_char_driver("ringbuf", CHARDEV_BACKEND_KIND_RINGBUF, qemu_chr_parse_ringbuf, NULL); register_char_driver("file", CHARDEV_BACKEND_KIND_FILE, |