forked from Imagelibrary/rtems
Introduce msdos_status_t.
This commit is contained in:
@@ -27,6 +27,8 @@ extern "C" {
|
||||
|
||||
#define MSDOS_NAME_NOT_FOUND_ERR 0xDD000001
|
||||
|
||||
typedef uint32_t msdos_status_t;
|
||||
|
||||
/*
|
||||
* This structure identifies the instance of the filesystem on the MSDOS
|
||||
* level.
|
||||
@@ -195,18 +197,18 @@ typedef enum msdos_token_types_e
|
||||
#define MSDOS_DPS512_NUM 16
|
||||
|
||||
/* Prototypes */
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_initialize(rtems_filesystem_mount_table_entry_t *temp_mt_entry);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_eval_path(const char *pathname, /* IN */
|
||||
int flags, /* IN */
|
||||
rtems_filesystem_location_info_t *pathloc /* IN/OUT */);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_eval4make(const char *path, /* IN */
|
||||
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
|
||||
const char **name /* OUT */);
|
||||
@@ -214,19 +216,19 @@ msdos_eval4make(const char *path, /* IN */
|
||||
int
|
||||
msdos_unlink(rtems_filesystem_location_info_t *pathloc /* IN */);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc /* IN */);
|
||||
|
||||
rtems_filesystem_node_types_t
|
||||
msdos_node_type(rtems_filesystem_location_info_t *pathloc);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_mknod(const char *path, /* IN */
|
||||
mode_t mode, /* IN */
|
||||
dev_t dev, /* IN */
|
||||
rtems_filesystem_location_info_t *pathloc /* IN/OUT */);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_utime(rtems_filesystem_location_info_t *pathloc, /* IN */
|
||||
time_t actime, /* IN */
|
||||
time_t modtime /* IN */);
|
||||
@@ -294,10 +296,10 @@ msdos_file_ioctl(
|
||||
void *buffer /* IN */
|
||||
);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_file_rmnod(rtems_filesystem_location_info_t *pathloc /* IN */);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_file_link(rtems_filesystem_location_info_t *to_loc,
|
||||
rtems_filesystem_location_info_t *pa_loc,
|
||||
const char *token);
|
||||
@@ -355,7 +357,7 @@ int
|
||||
msdos_find_name(rtems_filesystem_location_info_t *parent_loc,
|
||||
char *name);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_get_name_node(rtems_filesystem_location_info_t *parent_loc,
|
||||
char *name,
|
||||
fat_auxiliary_t *paux,
|
||||
@@ -400,7 +402,7 @@ msdos_dir_is_empty(rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
fat_file_fd_t *fat_fd,
|
||||
rtems_boolean *ret_val);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_find_name_in_fat_file(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
fat_file_fd_t *fat_fd,
|
||||
@@ -408,7 +410,7 @@ msdos_find_name_in_fat_file(
|
||||
fat_auxiliary_t *paux,
|
||||
char *name_dir_entry);
|
||||
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_find_node_by_cluster_num_in_fat_file(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
fat_file_fd_t *fat_fd,
|
||||
|
||||
@@ -285,7 +285,7 @@ err:
|
||||
* RETURNS:
|
||||
* RC_OK on success, or -1 if error occured (errno set appropriately)
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_file_link(rtems_filesystem_location_info_t *to_loc,
|
||||
rtems_filesystem_location_info_t *par_loc,
|
||||
const char *token
|
||||
|
||||
@@ -69,14 +69,14 @@ msdos_set_handlers(rtems_filesystem_location_info_t *loc)
|
||||
* (errno set appropriately)
|
||||
*
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_eval_path(
|
||||
const char *pathname,
|
||||
int flags,
|
||||
rtems_filesystem_location_info_t *pathloc
|
||||
)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
msdos_status_t rc = RC_OK;
|
||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
|
||||
fat_file_fd_t *fat_fd = NULL;
|
||||
@@ -250,14 +250,14 @@ err:
|
||||
* RC_OK, filled pathloc for parent directory and name of new node on
|
||||
* success, or -1 if error occured (errno set appropriately)
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_eval4make(
|
||||
const char *path,
|
||||
rtems_filesystem_location_info_t *pathloc,
|
||||
const char **name
|
||||
)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
msdos_status_t rc = RC_OK;
|
||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
|
||||
fat_file_fd_t *fat_fd = NULL;
|
||||
|
||||
@@ -455,10 +455,10 @@ msdos_file_ioctl(rtems_libio_t *iop,uint32_t command, void *buffer)
|
||||
* RETURNS:
|
||||
* RC_OK on success, or -1 if error occured (errno set appropriately)
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_file_rmnod(rtems_filesystem_location_info_t *pathloc)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
msdos_status_t rc = RC_OK;
|
||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
|
||||
fat_file_fd_t *fat_fd = pathloc->node_access;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* RC_OK on success, or -1 code if error occured
|
||||
*
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
* RC_OK on success, or -1 if error occured (errno set apropriately).
|
||||
*
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
msdos_status_t rc = RC_OK;
|
||||
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
|
||||
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
|
||||
|
||||
|
||||
@@ -51,10 +51,10 @@ rtems_filesystem_operations_table msdos_ops = {
|
||||
* RC_OK on success, or -1 if error occured (errno set apropriately).
|
||||
*
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_initialize(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
msdos_status_t rc;
|
||||
|
||||
rc = msdos_initialize_support(temp_mt_entry,
|
||||
&msdos_ops,
|
||||
|
||||
@@ -252,7 +252,7 @@ msdos_find_name(
|
||||
* error occured (errno set apropriately)
|
||||
*
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_get_name_node(
|
||||
rtems_filesystem_location_info_t *parent_loc,
|
||||
char *name,
|
||||
@@ -260,7 +260,7 @@ msdos_get_name_node(
|
||||
char *name_dir_entry
|
||||
)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
msdos_status_t rc = RC_OK;
|
||||
ssize_t ret = 0;
|
||||
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
|
||||
fat_file_fd_t *fat_fd = parent_loc->node_access;
|
||||
@@ -762,7 +762,7 @@ msdos_dir_is_empty(
|
||||
* appropriately)
|
||||
*
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_find_name_in_fat_file(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
fat_file_fd_t *fat_fd,
|
||||
@@ -771,7 +771,7 @@ msdos_find_name_in_fat_file(
|
||||
char *name_dir_entry
|
||||
)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
msdos_status_t rc = RC_OK;
|
||||
ssize_t ret = 0;
|
||||
msdos_fs_info_t *fs_info = mt_entry->fs_info;
|
||||
uint32_t i = 0, j = 0;
|
||||
@@ -880,7 +880,7 @@ msdos_find_name_in_fat_file(
|
||||
* RC_OK on success, or error code if error occured
|
||||
*
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_find_node_by_cluster_num_in_fat_file(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
fat_file_fd_t *fat_fd,
|
||||
@@ -889,7 +889,7 @@ msdos_find_node_by_cluster_num_in_fat_file(
|
||||
char *dir_entry
|
||||
)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
msdos_status_t rc = RC_OK;
|
||||
ssize_t ret = 0;
|
||||
msdos_fs_info_t *fs_info = mt_entry->fs_info;
|
||||
uint32_t bts2rd = 0;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
* RC_OK on succes, or -1 if error occured and set errno
|
||||
*
|
||||
*/
|
||||
int
|
||||
msdos_status_t
|
||||
msdos_mknod(
|
||||
const char *token,
|
||||
mode_t mode,
|
||||
@@ -53,7 +53,7 @@ msdos_mknod(
|
||||
rtems_filesystem_location_info_t *pathloc
|
||||
)
|
||||
{
|
||||
int rc = RC_OK;
|
||||
msdos_status_t rc = RC_OK;
|
||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
|
||||
msdos_token_types_t type = 0;
|
||||
|
||||
Reference in New Issue
Block a user