diff --git a/qemu-char.c b/qemu-char.c index e4eb985b5746270ba65fc63308e47335cab002bf..d9100a2201ec67fdec2c30b273715f7023eed6c7 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -204,7 +204,7 @@ void qemu_chr_be_write(CharDriverState *s, uint8_t *buf, int len) int qemu_chr_fe_get_msgfd(CharDriverState *s) { int fd; - return (qemu_chr_fe_get_msgfds(s, &fd, 1) >= 0) ? fd : -1; + return (qemu_chr_fe_get_msgfds(s, &fd, 1) == 1) ? fd : -1; } int qemu_chr_fe_get_msgfds(CharDriverState *s, int *fds, int len)