char: Fix return type of qemu_chr_fe_add_watch()
commit2c8a59422c06fe1e37c85502d92ccdfb5e2ac987
authorKevin Wolf <kwolf@redhat.com>
Tue, 19 Mar 2013 12:38:09 +0000 (19 13:38 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 19 Mar 2013 12:56:07 +0000 (19 07:56 -0500)
treef92591dd4bd77c08627f1c7895f853c71a8f7c82
parentf628926bb423fa8a7e0b114511400ea9df38b76a
char: Fix return type of qemu_chr_fe_add_watch()

qemu_chr_fe_add_watch() can return negative errors, therefore it must
not have an unsigned return type. For consistency with other
qemu_chr_fe_* functions, this uses a standard C int instead of glib
types.

In situations where qemu_chr_fe_add_watch() is falsely assumed to have
succeeded, the serial ports would go into a state where it never becomes
ready for transmitting more data; this is fixed by this patch.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
include/char/char.h
qemu-char.c