next up previous contents index
Next: 23 Executable Program Interpreter: Up: 22.4 API reference Previous: 22.4.1 fsread_open: Open a

22.4.2 fsread_FSTYPE_open: Open a file on the FSTYPE filesystem

 

SYNOPSIS

#include <oskit/fs/read.h>

oskit_error_t fsread_FSTYPE_open(oskit_blkio_t *device, const char *path, [out] oskit_blkio_t **out_file);

DESCRIPTION

Tries to open a file named by path in the FSTYPE filesystem on device. If successful, returns a blkio into out_file that can be used to read the file.

FSTYPE can be one of ext2, ffs, minix.

PARAMETERS

device
An oskit_blkio_t (Section 5.3) representing a device containing a FSTYPE filesystem.
path
A pathname indicating an existing file to open. This pathname is taken relative to the root of the filesystem
out_file
Upon success, this is set to an oskit_blkio_t that can be used to read from the file.

RETURNS

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


University of Utah Flux Research Group