next up previous contents index
Next: 20.1.2 chroot: Set the Up: 20.1 Introduction Previous: 20.1 Introduction

20.1.1 oskit_create_fsnamespace: Create a filesystem namespace object

 

SYNOPSIS

#include <oskit/fs/fsnamespace.h>

oskit_error_t oskit_create_fsnamespace(struct oskit_dir *rootdir, struct oskit_dir *cwd, oskit_fsnamespace_t **out_fsnamespace);

DESCRIPTION

Create a new fileystem namespace object, with the given root and current working directories. Typically, this routine will be called when the client OS is initialized. Once the root filesystem has been opened, the client OS will call this routine to create a namespace object, specifying the root directory of the root filesystem as the root directory and current working directory of the new namespace. Subsequent pathname translation is then ``rooted'' at these locations.

PARAMETERS

rootdir
The OSKit oskit_dir of the initial root directory.
cwd
The OSKit oskit_dir of the initial current working directory.
out_fsnamespace
The oskit_fsnamespace COM interface for the new object.

RETURNS

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

The oskit_fsnamespace COM interface inherits from IUnknown, and has the following additional methods:

chroot
Set the root directory for subsequent absolute path translation.
chcwd
Set the current working directory for subsequent relative path translation.
lookup
Convert a multi component pathname into a file or directory object.
mount
Mount a filesystem at a given point in the namespace.
unmount
Unmount a filesystem from the namespace.
clone
Make a duplicate copy of a filesystem namespace object.



Utah Flux Research Group