From a72c454eed187c0cccae23b32b7ad23108e2f3cb Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 5 Aug 2005 10:38:05 +0000 Subject: Introduce msdos_status_t. --- cpukit/libfs/src/dosfs/msdos.h | 26 ++++++++++++++------------ cpukit/libfs/src/dosfs/msdos_create.c | 2 +- cpukit/libfs/src/dosfs/msdos_eval.c | 8 ++++---- cpukit/libfs/src/dosfs/msdos_file.c | 4 ++-- cpukit/libfs/src/dosfs/msdos_free.c | 2 +- cpukit/libfs/src/dosfs/msdos_fsunmount.c | 4 ++-- cpukit/libfs/src/dosfs/msdos_init.c | 4 ++-- cpukit/libfs/src/dosfs/msdos_misc.c | 12 ++++++------ cpukit/libfs/src/dosfs/msdos_mknod.c | 4 ++-- 9 files changed, 34 insertions(+), 32 deletions(-) (limited to 'cpukit') diff --git a/cpukit/libfs/src/dosfs/msdos.h b/cpukit/libfs/src/dosfs/msdos.h index a916ed22ca..f1b7528715 100644 --- a/cpukit/libfs/src/dosfs/msdos.h +++ b/cpukit/libfs/src/dosfs/msdos.h @@ -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, diff --git a/cpukit/libfs/src/dosfs/msdos_create.c b/cpukit/libfs/src/dosfs/msdos_create.c index 8c238d396c..280e2de31c 100644 --- a/cpukit/libfs/src/dosfs/msdos_create.c +++ b/cpukit/libfs/src/dosfs/msdos_create.c @@ -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 diff --git a/cpukit/libfs/src/dosfs/msdos_eval.c b/cpukit/libfs/src/dosfs/msdos_eval.c index 0bba0c0a5e..3fe7029138 100644 --- a/cpukit/libfs/src/dosfs/msdos_eval.c +++ b/cpukit/libfs/src/dosfs/msdos_eval.c @@ -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; diff --git a/cpukit/libfs/src/dosfs/msdos_file.c b/cpukit/libfs/src/dosfs/msdos_file.c index 14bd96b325..12cf5ac6e7 100644 --- a/cpukit/libfs/src/dosfs/msdos_file.c +++ b/cpukit/libfs/src/dosfs/msdos_file.c @@ -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; diff --git a/cpukit/libfs/src/dosfs/msdos_free.c b/cpukit/libfs/src/dosfs/msdos_free.c index 2fb74e2387..db9ff9c984 100644 --- a/cpukit/libfs/src/dosfs/msdos_free.c +++ b/cpukit/libfs/src/dosfs/msdos_free.c @@ -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; diff --git a/cpukit/libfs/src/dosfs/msdos_fsunmount.c b/cpukit/libfs/src/dosfs/msdos_fsunmount.c index bd978179e2..796dd55aeb 100644 --- a/cpukit/libfs/src/dosfs/msdos_fsunmount.c +++ b/cpukit/libfs/src/dosfs/msdos_fsunmount.c @@ -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; diff --git a/cpukit/libfs/src/dosfs/msdos_init.c b/cpukit/libfs/src/dosfs/msdos_init.c index f09f8d7291..afeaeae3c9 100644 --- a/cpukit/libfs/src/dosfs/msdos_init.c +++ b/cpukit/libfs/src/dosfs/msdos_init.c @@ -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, diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c index b256c5e5e1..0924929deb 100644 --- a/cpukit/libfs/src/dosfs/msdos_misc.c +++ b/cpukit/libfs/src/dosfs/msdos_misc.c @@ -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; diff --git a/cpukit/libfs/src/dosfs/msdos_mknod.c b/cpukit/libfs/src/dosfs/msdos_mknod.c index a17de1ade1..7c59d9800e 100644 --- a/cpukit/libfs/src/dosfs/msdos_mknod.c +++ b/cpukit/libfs/src/dosfs/msdos_mknod.c @@ -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; -- cgit v1.2.3