next up previous contents index
Next: 5.4 oskit_bufio: Buffer-based I/O Up: 5.3 oskit_blkio: Block I/O Previous: 5.3.4 getsize: Get the

5.3.5 setsize: Set the size of this object

 

SYNOPSIS

#include <oskit/io/blkio.h>

OSKIT_COMDECL oskit_blkio_setsize(oskit_blkio_t *f, oskit_off_t new_size);

DESCRIPTION

This method sets the size of this object to new_size bytes. If new_size is larger than the former size of this object, then the contents of the object between its former end and its new end are undefined.

Note that some block I/O objects may be fixed-size, such as objects representing physical disks or partitions; in such cases, this method will always return OSKIT_E_NOTIMPL.

PARAMETERS

f
The object whose size is to be changed.
new_size
The new size in bytes for this object. 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