aboutsummaryrefslogtreecommitdiff
path: root/util/osdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/osdep.c')
-rw-r--r--util/osdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/osdep.c b/util/osdep.c
index a73de0e1ba..ea51d500b6 100644
--- a/util/osdep.c
+++ b/util/osdep.c
@@ -302,7 +302,8 @@ int qemu_open(const char *name, int flags, ...)
}
fd = monitor_fdset_get_fd(fdset_id, flags);
- if (fd == -1) {
+ if (fd < 0) {
+ errno = -fd;
return -1;
}