qemu-sockets: add error propagation to inet_dgram_opts
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Oct 2012 07:25:14 +0000 (09:25 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 23 Oct 2012 11:54:57 +0000 (13:54 +0200)
commit4f085c822947068c785be8c1f27d1ad4e3215149
treedd63cba7b0c065cca2a3d9bc06d8174499699154
parent11663b553b0815b266b6a9060ab9702cf7a5334c
qemu-sockets: add error propagation to inet_dgram_opts

Before:

    $ qemu-system-x86_64 -monitor udp:localhost:631@localhost:631
    inet_dgram_opts: bind(ipv4,127.0.0.1,631): OK
    inet_dgram_opts failed
    chardev: opening backend "udp" failed

After:

    $ x86_64-softmmu/qemu-system-x86_64 -monitor udp:localhost:631@localhost:631
    qemu-system-x86_64: -monitor udp:localhost:631@localhost:631: Failed to bind socket: Address already in use
    chardev: opening backend "udp" failed

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-char.c
qemu-sockets.c