RTEMS  5.1
Macros | Functions

RTEMS File Systems Open. More...

#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <rtems/rfs/rtems-rfs-data.h>
#include <rtems/rfs/rtems-rfs-file-system.h>
#include <rtems/rfs/rtems-rfs-inode.h>
#include <rtems/rfs/rtems-rfs-trace.h>

Macros

#define read_sb(_o)   rtems_rfs_read_u32 (sb + (_o))
 

Functions

uint64_t rtems_rfs_fs_size (rtems_rfs_file_system *fs)
 
uint64_t rtems_rfs_fs_media_size (rtems_rfs_file_system *fs)
 
int rtems_rfs_fs_open (const char *name, void *user, uint32_t flags, uint32_t max_held_buffers, rtems_rfs_file_system **fs)
 
int rtems_rfs_fs_close (rtems_rfs_file_system *fs)
 

Detailed Description

RTEMS File Systems Open.

Open the file system by reading the superblock and then the group data.

Function Documentation

◆ rtems_rfs_fs_close()

int rtems_rfs_fs_close ( rtems_rfs_file_system fs)

Close the file system.

Parameters
[in]fsis the file system data.
Return values
0Successful operation.
-1Error. See errno

◆ rtems_rfs_fs_media_size()

uint64_t rtems_rfs_fs_media_size ( rtems_rfs_file_system fs)

The size of the disk in bytes calculated from the media parameters..

Parameters
[in]fsis a pointer to the file system.
Returns
uint64_t The size of the disk in bytes.

◆ rtems_rfs_fs_open()

int rtems_rfs_fs_open ( const char *  name,
void *  user,
uint32_t  flags,
uint32_t  max_held_buffers,
rtems_rfs_file_system **  fs 
)

Open the file system given a file path.

Parameters
[in]nameis a pointer to the device to open.
[in]fsis the file system data filled in by this call.
[in]useris a pointer to the user data.
[in]flagsis a initial set of user flags for the file system.
[in]max_held_buffersis the maximum number of buffers the RFS holds.
Return values
0Successful operation.
-1Error. See errno

◆ rtems_rfs_fs_size()

uint64_t rtems_rfs_fs_size ( rtems_rfs_file_system fs)

Return the size of the disk in bytes.

Parameters
[in]fsis a pointer to the file system.
Returns
uint64_t The size of the disk in bytes.