diff options
Diffstat (limited to 'cpukit/libfs/src/dosfs/msdos_dir.c')
-rw-r--r-- | cpukit/libfs/src/dosfs/msdos_dir.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_dir.c b/cpukit/libfs/src/dosfs/msdos_dir.c index be6b5a91ff..38ea6675f7 100644 --- a/cpukit/libfs/src/dosfs/msdos_dir.c +++ b/cpukit/libfs/src/dosfs/msdos_dir.c @@ -30,70 +30,6 @@ #include "msdos.h" -/* msdos_dir_open -- - * Open fat-file which correspondes to the directory being opened and - * set offset field of file control block to zero. - */ -int -msdos_dir_open(rtems_libio_t *iop, const char *pathname, int oflag, - mode_t mode) -{ - int rc = RC_OK; - rtems_status_code sc = RTEMS_SUCCESSFUL; - msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info; - fat_file_fd_t *fat_fd = iop->pathinfo.node_access; - - sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT, - MSDOS_VOLUME_SEMAPHORE_TIMEOUT); - if (sc != RTEMS_SUCCESSFUL) - rtems_set_errno_and_return_minus_one( EIO ); - - rc = fat_file_reopen(fat_fd); - if (rc != RC_OK) - { - rtems_semaphore_release(fs_info->vol_sema); - return rc; - } - - iop->offset = 0; - rtems_semaphore_release(fs_info->vol_sema); - return RC_OK; -} - -/* msdos_dir_close -- - * Close fat-file which correspondes to the directory being closed - * - * PARAMETERS: - * iop - file control block - * - * RETURNS: - * RC_OK, if directory closed successfully, or -1 if error occured (errno - * set apropriately. - */ -int -msdos_dir_close(rtems_libio_t *iop) -{ - int rc = RC_OK; - rtems_status_code sc = RTEMS_SUCCESSFUL; - msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info; - fat_file_fd_t *fat_fd = iop->pathinfo.node_access; - - sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT, - MSDOS_VOLUME_SEMAPHORE_TIMEOUT); - if (sc != RTEMS_SUCCESSFUL) - rtems_set_errno_and_return_minus_one( EIO ); - - rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd); - if (rc != RC_OK) - { - rtems_semaphore_release(fs_info->vol_sema); - return rc; - } - - rtems_semaphore_release(fs_info->vol_sema); - return RC_OK; -} - /* msdos_format_dirent_with_dot -- * This routine convert a (short) MSDOS filename as present on disk * (fixed 8+3 characters, filled with blanks, without separator dot) |