> 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 change the file offset. > > Can't io_seek be called with SEEK_CUR, 0, thus not changing the file > offset?
Yes, it can. But pread making two RPCs rather than one would defeat half the purpose of its existence. Thanks, Roland