RTEMS
5.1
|
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) |
RTEMS File Systems Buffer Routines.
int rtems_rfs_buffer_close | ( | rtems_rfs_file_system * | fs | ) |
Close the buffer interface.
[in] | fs | is the file system data. |
0 | Successful operation. |
error_code | An error occurred. |
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.
[in] | fs | is the file system data. |
[in] | handle | is the handle the requested buffer is attached to. |
0 | Successful operation. |
error_code | An error occurred. |
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.
[in] | fs | is the file system data. |
[in] | handle | is the handle the requested buffer is attached to. |
[in] | block | is the block number. |
[in] | read | Read the data from the disk. |
0 | Successful operation. |
error_code | An error occurred. |
int rtems_rfs_buffer_open | ( | const char * | name, |
rtems_rfs_file_system * | fs | ||
) |
Open the buffer interface.
[in] | name | is a pointer to the device name to the media. |
[in] | fs | is the file system data. |
0 | Successful operation. |
error_code | An error occurred. |
int rtems_rfs_buffer_setblksize | ( | rtems_rfs_file_system * | fs, |
uint32_t | size | ||
) |
Set the block size of the device.
[in] | fs | is the file system data. |
[in] | size | is the new block size. |
0 | Successful operation. |
error_code | An error occurred. |
int rtems_rfs_buffer_sync | ( | rtems_rfs_file_system * | fs | ) |
Sync all buffers to the media.
[in] | fs | is the file system data. |
0 | Successful operation. |
error_code | An error occurred. |
int rtems_rfs_buffers_release | ( | rtems_rfs_file_system * | fs | ) |
Release any chained buffers.
[in] | fs | is the file system data. |
0 | Successful operation. |
error_code | An error occurred. |