RTEMS  5.1
Functions

RTEMS File Systems Buffer Routines. More...

#include <sys/stat.h>
#include <inttypes.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <rtems/rfs/rtems-rfs-buffer.h>
#include <rtems/rfs/rtems-rfs-file-system.h>

Functions

int rtems_rfs_buffer_handle_request (rtems_rfs_file_system *fs, rtems_rfs_buffer_handle *handle, rtems_rfs_buffer_block block, bool read)
 
int rtems_rfs_buffer_handle_release (rtems_rfs_file_system *fs, rtems_rfs_buffer_handle *handle)
 
int rtems_rfs_buffer_open (const char *name, rtems_rfs_file_system *fs)
 
int rtems_rfs_buffer_close (rtems_rfs_file_system *fs)
 
int rtems_rfs_buffer_sync (rtems_rfs_file_system *fs)
 
int rtems_rfs_buffer_setblksize (rtems_rfs_file_system *fs, uint32_t size)
 
int rtems_rfs_buffers_release (rtems_rfs_file_system *fs)
 

Detailed Description

RTEMS File Systems Buffer Routines.

Function Documentation

◆ rtems_rfs_buffer_close()

int rtems_rfs_buffer_close ( rtems_rfs_file_system fs)

Close the buffer interface.

Parameters
[in]fsis the file system data.
Return values
0Successful operation.
error_codeAn error occurred.

◆ rtems_rfs_buffer_handle_release()

int rtems_rfs_buffer_handle_release ( rtems_rfs_file_system fs,
rtems_rfs_buffer_handle handle 
)

Release a buffer. If the buffer is dirty the buffer is written to disk. The result does not indicate if the data was successfully written to the disk as this operation may be performed in asynchronously to this release.

Parameters
[in]fsis the file system data.
[in]handleis the handle the requested buffer is attached to.
Return values
0Successful operation.
error_codeAn error occurred.

◆ rtems_rfs_buffer_handle_request()

int rtems_rfs_buffer_handle_request ( rtems_rfs_file_system fs,
rtems_rfs_buffer_handle handle,
rtems_rfs_buffer_block  block,
bool  read 
)

Request a buffer. The buffer can be filled with data from the media (read == true) or you can request a buffer to fill with data.

Parameters
[in]fsis the file system data.
[in]handleis the handle the requested buffer is attached to.
[in]blockis the block number.
[in]readRead the data from the disk.
Return values
0Successful operation.
error_codeAn error occurred.

◆ rtems_rfs_buffer_open()

int rtems_rfs_buffer_open ( const char *  name,
rtems_rfs_file_system fs 
)

Open the buffer interface.

Parameters
[in]nameis a pointer to the device name to the media.
[in]fsis the file system data.
Return values
0Successful operation.
error_codeAn error occurred.

◆ rtems_rfs_buffer_setblksize()

int rtems_rfs_buffer_setblksize ( rtems_rfs_file_system fs,
uint32_t  size 
)

Set the block size of the device.

Parameters
[in]fsis the file system data.
[in]sizeis the new block size.
Return values
0Successful operation.
error_codeAn error occurred.

◆ rtems_rfs_buffer_sync()

int rtems_rfs_buffer_sync ( rtems_rfs_file_system fs)

Sync all buffers to the media.

Parameters
[in]fsis the file system data.
Return values
0Successful operation.
error_codeAn error occurred.

◆ rtems_rfs_buffers_release()

int rtems_rfs_buffers_release ( rtems_rfs_file_system fs)

Release any chained buffers.

Parameters
[in]fsis the file system data.
Return values
0Successful operation.
error_codeAn error occurred.