提交 aa3db423 编写于 作者: A Alon Levy 提交者: Gerd Hoffmann

qxl: init_pipe_signaling: exit on failure

If pipe creation fails, exit, don't log and continue. Fix indentation at
the same time.
Signed-off-by: NAlon Levy <alevy@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 6ec5dae5
...@@ -1452,16 +1452,17 @@ static void qxl_send_events(PCIQXLDevice *d, uint32_t events) ...@@ -1452,16 +1452,17 @@ static void qxl_send_events(PCIQXLDevice *d, uint32_t events)
static void init_pipe_signaling(PCIQXLDevice *d) static void init_pipe_signaling(PCIQXLDevice *d)
{ {
if (pipe(d->pipe) < 0) { if (pipe(d->pipe) < 0) {
dprint(d, 1, "%s: pipe creation failed\n", __FUNCTION__); fprintf(stderr, "%s:%s: qxl pipe creation failed\n",
return; __FILE__, __func__);
} exit(1);
fcntl(d->pipe[0], F_SETFL, O_NONBLOCK); }
fcntl(d->pipe[1], F_SETFL, O_NONBLOCK); fcntl(d->pipe[0], F_SETFL, O_NONBLOCK);
fcntl(d->pipe[0], F_SETOWN, getpid()); fcntl(d->pipe[1], F_SETFL, O_NONBLOCK);
fcntl(d->pipe[0], F_SETOWN, getpid());
qemu_thread_get_self(&d->main);
qemu_set_fd_handler(d->pipe[0], pipe_read, NULL, d); qemu_thread_get_self(&d->main);
qemu_set_fd_handler(d->pipe[0], pipe_read, NULL, d);
} }
/* graphics console */ /* graphics console */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册