Re: [Qemu-devel] [PATCH 1/5] oslib-posix: add qemu_pipe_non_block

2013-06-04 Thread Alon Levy
> On 06/04/2013 02:23 PM, Alon Levy wrote: > > Used by the followin patch. > > s/followin/following/ Thanks. > > > > > +int qemu_pipe_non_block(int pipefd[2]) > > +{ > > +int ret; > > + > > +ret = qemu_pipe(pipefd); > > qemu_pipe() already uses pipe2() when available; it seems like i

Re: [Qemu-devel] [PATCH 1/5] oslib-posix: add qemu_pipe_non_block

2013-06-04 Thread Eric Blake
On 06/04/2013 02:23 PM, Alon Levy wrote: > Used by the followin patch. s/followin/following/ > > +int qemu_pipe_non_block(int pipefd[2]) > +{ > +int ret; > + > +ret = qemu_pipe(pipefd); qemu_pipe() already uses pipe2() when available; it seems like it would be nicer to use pipe2's O_NO

Re: [Qemu-devel] [PATCH 1/5] oslib-posix: add qemu_pipe_non_block

2013-06-04 Thread Peter Maydell
On 4 June 2013 21:23, Alon Levy wrote: > > +int qemu_pipe_non_block(int pipefd[2]) > +{ > +int ret; > + > +ret = qemu_pipe(pipefd); > +if (ret) { > +return ret; > +} > +if (fcntl(card->pipe[0], F_SETFL, O_NONBLOCK) == -1) { > +return -errno; > +} > +if (