summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-03-19 13:38:09 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-19 07:56:07 -0500
commit2c8a59422c06fe1e37c85502d92ccdfb5e2ac987 (patch)
treef92591dd4bd77c08627f1c7895f853c71a8f7c82 /include
parentf628926bb423fa8a7e0b114511400ea9df38b76a (diff)
downloadqemu-2c8a59422c06fe1e37c85502d92ccdfb5e2ac987.tar.gz
qemu-2c8a59422c06fe1e37c85502d92ccdfb5e2ac987.tar.bz2
qemu-2c8a59422c06fe1e37c85502d92ccdfb5e2ac987.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/char/char.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/char/char.h b/include/char/char.h
index d6a03513bf..0326b2a47b 100644
--- a/include/char/char.h
+++ b/include/char/char.h
@@ -153,8 +153,8 @@ void qemu_chr_fe_close(struct CharDriverState *chr);
void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
GCC_FMT_ATTR(2, 3);
-guint qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond,
- GIOFunc func, void *user_data);
+int qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond,
+ GIOFunc func, void *user_data);
/**
* @qemu_chr_fe_write: