Paolo Bonzini 6f1de6b70d 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 <bcketchum@gmail.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-06-29 14:03:47 +02:00
..
2015-11-10 15:00:28 +01:00
2016-02-23 12:43:05 +00:00
2015-05-08 14:11:10 +03:00
2016-02-23 12:43:05 +00:00
2016-06-16 18:39:03 +02:00
2016-02-23 12:43:05 +00:00
2016-03-08 12:54:14 +05:30
2016-02-23 12:43:05 +00:00
2016-06-13 13:24:41 +02:00
2016-02-23 12:43:05 +00:00
2015-06-03 18:19:15 +02:00
2016-02-23 12:43:05 +00:00