RTEMS: cpukit/libfs/src/rfs/rtems-rfs-file-system.c File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Macros | Functions
rtems-rfs-file-system.c File Reference
IO Library » File System Types and Mount » RTEMS File System Group Management

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] | fs | is the file system data.

Return values

  0 | Successful operation.
  -1 | Error. 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] | fs | is 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] | name | is a pointer to the device to open.
  [in] | fs | is the file system data filled in by this call.
  [in] | user | is a pointer to the user data.
  [in] | flags | is a initial set of user flags for the file system.
  [in] | max_held_buffers | is the maximum number of buffers the RFS holds.

Return values

  0 | Successful operation.
  -1 | Error. 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] | fs | is a pointer to the file system.

Returns
  uint64_t The size of the disk in bytes.