next up previous contents index
Next: 5.3.3 write: Write to Up: 5.3 oskit_blkio: Block I/O Previous: 5.3.1 getblocksize: Return the

5.3.2 read: Read from this object, starting at specified offset

 

SYNOPSIS

#include <oskit/io/blkio.h>

OSKIT_COMDECL oskit_blkio_read(oskit_blkio_t *f, void *buf, oskit_off_t offset, oskit_size_t amount, [out] oskit_size_t *out_actual);

DESCRIPTION

This method reads no more than amount bytes into buf from this object, starting at offset. out_actual is set to the actual number of bytes read.

PARAMETERS

f
The object from which to read.
buf
The buffer into which the data is to be copied.
offset
The offset in this object at which to start reading. Must be a multiple of the object's block size.
amount
The maximum number of bytes to read. Must be a multiple of the object's block size.
out_actual
The actual number of bytes read. Must be a multiple of the object's block size.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



University of Utah Flux Research Group