l4vfs::basic_io Interface Reference
Typical base interface for object oriented servers.
More...
import "basic_io.idl";
List of all members.
|
Public Member Functions |
object_handle_t | open ([in] object_id_t object_id,[in] int flags) |
| open an object
|
object_handle_t | creat ([in] object_id_t parent,[in, string] char *name,[in] int flags,[in] l4vfs_mode_t mode) |
| create and open a new object
|
int | unlink ([in] object_id_t file) |
| remove an object from the name space
|
int | rmdir ([in] object_id_t dir) |
| remove an directory from the name space
|
l4vfs_off_t | lseek ([in] object_handle_t handle,[in] l4vfs_off_t offset,[in] int whence) |
| change seek position for opened file
|
int | fsync ([in] object_handle_t handle) |
| Synchronize file state with storage medium.
|
int | getdents ([in] object_handle_t handle,[out, size_is(count), transmit_as(unsigned char), ref, prealloc_client, prealloc_server] l4vfs_dirent_t **dirp,[in, out] unsigned int *count) |
int | stat ([in] object_id_t object_id,[out] l4vfs_stat_t *buf) |
| get metadata about object
|
int | access ([in] object_id_t file,[in] int mode) |
| check access right for a specific access mode
|
Detailed Description
Typical base interface for object oriented servers.
Member Function Documentation
object_handle_t l4vfs::basic_io::open |
( |
[in] object_id_t |
object_id, |
|
|
[in] int |
flags | |
|
) |
| | |
open an object
- Parameters:
-
| object_id | id of the object to open |
| flags | flags as described in 'man 2 open' |
- Returns:
- handle to open object (>= 0)
- -errorcode in case of error (see 'man 2 open')
object_handle_t l4vfs::basic_io::creat |
( |
[in] object_id_t |
parent, |
|
|
[in, string] char * |
name, |
|
|
[in] int |
flags, |
|
|
[in] l4vfs_mode_t |
mode | |
|
) |
| | |
create and open a new object
- Note:
- The name should be a local name, relative to parent. It is up to the clientlib to resolve longer names to a pair of (parent, name).
- Parameters:
-
| parent | id of the parent directory to create the object in |
| name | name of the object to be created |
| flags | flags as described in 'man 2 open' |
| mode | see 'man 2 open', ignored for now by most servers |
- Returns:
- handle to created and opened object (>= 0)
- -errorcode in case of error (see 'man 2 open')
remove an object from the name space
- Parameters:
-
- Returns:
- 0 on success, errorcode otherwise, (see 'man 2 unlink')
remove an directory from the name space
- Parameters:
-
- Returns:
- 0 on success, errorcode otherwise, (see 'man 2 rmdir')
l4vfs_off_t l4vfs::basic_io::lseek |
( |
[in] object_handle_t |
handle, |
|
|
[in] l4vfs_off_t |
offset, |
|
|
[in] int |
whence | |
|
) |
| | |
change seek position for opened file
- Parameters:
-
| handle | handle to operate on |
| offset | target offset |
| whence | addressing mode to use (see 'man 2 lseek') |
- Returns:
- new seek position in file, on success
- -errocode on error (see 'man 2 lseek')
int l4vfs::basic_io::fsync |
( |
[in] object_handle_t |
handle |
) |
|
Synchronize file state with storage medium.
- Parameters:
-
| handle | handle to operate on |
- Returns:
- 0 on success, errorcode otherwise (see 'man 2 fsync')
int l4vfs::basic_io::getdents |
( |
[in] object_handle_t |
handle, |
|
|
[out, size_is(count), transmit_as(unsigned char), ref, prealloc_client, prealloc_server] l4vfs_dirent_t ** |
dirp, |
|
|
[in, out] unsigned int * |
count | |
|
) |
| | |
- Parameters:
-
| handle | handle to operate on |
- Return values:
-
| dirp | pointer to memory buffer to fill with results |
- Parameters:
-
| count | size of the memory buffer in bytes |
- Returns:
- the number of bytes read, on success,
- errorcode otherwise (see 'man 2 getdents')
int l4vfs::basic_io::stat |
( |
[in] object_id_t |
object_id, |
|
|
[out] l4vfs_stat_t * |
buf | |
|
) |
| | |
get metadata about object
- Parameters:
-
| object_id | object_id to operate on |
- Return values:
-
| buf | memory buffer to copy results to |
- Returns:
- 0 on success,
int l4vfs::basic_io::access |
( |
[in] object_id_t |
file, |
|
|
[in] int |
mode | |
|
) |
| | |
check access right for a specific access mode
- Parameters:
-
| file | object to operate on |
| mode | access mode to check right for |
- Returns:
- 0 on success,
- -errorcode otherwise (see 'man 2 access')
The documentation for this interface was generated from the following file: