aboutsummaryrefslogtreecommitdiff
path: root/block-raw-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'block-raw-posix.c')
-rw-r--r--block-raw-posix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block-raw-posix.c b/block-raw-posix.c
index 2875fa1bfc..267d6c07bd 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -584,6 +584,10 @@ static int posix_aio_init(void)
s->first_aio = NULL;
s->fd = qemu_signalfd(&mask);
+ if (s->fd == -1) {
+ fprintf(stderr, "failed to create signalfd\n");
+ return -errno;
+ }
fcntl(s->fd, F_SETFL, O_NONBLOCK);