Re: pread()

2010-11-01 Thread Samuel Thibault
Manuel Menal, le Sun 31 Oct 2010 23:13:18 +0100, a écrit : > I've included a change for the documentation as well. Could you avoid reformating paragraphs? It makes finding out the actual changes tedious. Samuel

Re: pread()

2010-10-31 Thread Manuel Menal
On 14/10/2010 19:10, Roland McGrath wrote: >> Shouldn't we change io_write() too? > Yes, they are exact parallels. Here is a patch that should make io_read() and io_write() return ESPIPE when called with offset != -1 for non-seekable objects. I've tested all the components affected by this pat

Re: pread()

2010-10-14 Thread Roland McGrath
> Shouldn't we change io_write() too? Yes, they are exact parallels.

Re: pread()

2010-10-14 Thread Manuel Menal
On 09/10/2010 21:00, Roland McGrath wrote: > I think it would be reasonable to change the specification for io_read to > say that the offset parameter must be exactly (off_t)-1 for a nonseekable > io object, and that otherwise it must fail with ESPIPE. We might need to > audit the existing uses to

Re: pread()

2010-10-09 Thread Roland McGrath
> Manuel Menal, le Sat 09 Oct 2010 20:40:26 +0200, a écrit : > > There should be a way to check if the object is seekable or not before > > calling io_read(), so pread() can return an error. But there is no > > io_seekable() RPC, and calling io_seek() seems wrong to me, since > > pread() is suppose

Re: pread()

2010-10-09 Thread Roland McGrath
I think it would be reasonable to change the specification for io_read to say that the offset parameter must be exactly (off_t)-1 for a nonseekable io object, and that otherwise it must fail with ESPIPE. We might need to audit the existing uses to make sure there aren't uses that would violate thi

Re: pread()

2010-10-09 Thread Samuel Thibault
Manuel Menal, le Sat 09 Oct 2010 20:40:26 +0200, a écrit : > There should be a way to check if the object is seekable or not before > calling io_read(), so pread() can return an error. But there is no > io_seekable() RPC, and calling io_seek() seems wrong to me, since > pread() is supposed not to c