]> Git Repo - qemu.git/commit
char: change qemu_chr_fe_add_watch to return unsigned
authorPaolo Bonzini <[email protected]>
Mon, 20 Jun 2016 13:02:40 +0000 (15:02 +0200)
committerPaolo Bonzini <[email protected]>
Wed, 29 Jun 2016 12:03:47 +0000 (14:03 +0200)
commit6f1de6b70d857d5e316ae6fd908f52818b827b08
tree1a0c8e85a0d1046373cdad821e9dda0025046be9
parentb0585e7e07982daa578c3bfef7f6843c89f110a8
char: change qemu_chr_fe_add_watch to return unsigned

g_source_attach can return any value between 1 and UINT_MAX if you let
QEMU run long enough.  However, qemu_chr_fe_add_watch can also return
a negative errno value when the device is disconnected or does not
support chr_add_watch.  Change it to return zero to avoid overloading
these values.

Fix the cadence_uart which asserts in this case (easily obtained with
"-serial pty").

Tested-by: Bret Ketchum <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
hw/char/cadence_uart.c
include/sysemu/char.h
net/vhost-user.c
qemu-char.c
This page took 0.026793 seconds and 4 git commands to generate.