source: rtems/cpukit/libfs/src/dosfs/msdos_fsunmount.c @ 3c96bee

4.115
Last change on this file since 3c96bee was d2e0bb3, checked in by Ralf Kirchner <ralf.kirchner@…>, on 05/22/13 at 10:16:18

dosfs: UTF-8 Support: UI, backwards compatibility

User interface and backwards compatibility for UTF-8 support in the FAT
file system. Purpose of UTF-8 support is to permit file names and
directory names with characters from all kinds of languages (Czech,
Chinese, Arabian, Hebrew, Korean, ...). This commit does not yet
support multibyte characters. It only contains the user interface and
the backwards compatibility.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/**
2 * @file
3 *
4 * @brief Shut Down MSDOS FileSystem
5 * @ingroup libfs_msdos MSDOS FileSystem
6 */
7
8/*
9 *  Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
10 *  Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <sys/types.h>
22#include <fcntl.h>
23#include <unistd.h>
24#include <stdlib.h>
25#include <stdio.h>
26
27#include <rtems.h>
28#include <rtems/libio_.h>
29
30#include "fat.h"
31#include "fat_fat_operations.h"
32#include "fat_file.h"
33
34#include "msdos.h"
35
36/* msdos_shut_down --
37 *     Shut down MSDOS filesystem - free all allocated resources (don't
38 *     return if deallocation of some resource failed - free as much as
39 *     possible).
40 *
41 * PARAMETERS:
42 *     temp_mt_entry - mount table entry
43 *
44 */
45void
46msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
47{
48    msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
49    fat_file_fd_t   *fat_fd = temp_mt_entry->mt_fs_root->location.node_access;
50    rtems_dosfs_convert_control *converter = fs_info->converter;
51
52    /* close fat-file which corresponds to root directory */
53    fat_file_close(&fs_info->fat, fat_fd);
54
55    fat_shutdown_drive(&fs_info->fat);
56
57    rtems_semaphore_delete(fs_info->vol_sema);
58    (*converter->handler->destroy)( converter );
59    free(fs_info->cl_buf);
60    free(temp_mt_entry->fs_info);
61}
Note: See TracBrowser for help on using the repository browser.