Saul A
|
How to pass starting offset to read() and write()?
|
Saul A
11/09/2010 12:08 AM
post73987
|
How to pass starting offset to read() and write()?
Hello all,
I need to make a device driver (resource manager) that supports
read and write operations at random offsets.
From the sample code in the docum, it looks that read and write requests can contain the offsets. Can anybody tell me
please, what API allows to pass the offset? Normal read() and write() do not. aio_xxx functions can pass the offset, but
the library manual says that these are not supported (my target is 6.3.2, by the way).
I want to avoid seek() before every read or write, because this will be a separate message exchange with the resource
manager, correct?
As alternative, I could use devctlv() with two iovec's, one of which will contain the offset. But devctlv is
undocumented (?) and I am not sure how to handle it on the server side.
Thanks for any idea,
- S.
|
|
|