source: rtems/cpukit/libfs/src/dosfs/msdos_init.c @ 8ec7abb

4.104.115
Last change on this file since 8ec7abb was 8ec7abb, checked in by Chris Johns <chrisj@…>, on 03/04/10 at 06:36:51

010-03-04 Chris Johns <chrisj@…>

  • libcsupport/include/rtems/libio.h, libcsupport/src/_rename_r.c: Add a rename file op and have rename use it.
  • libfs/Makefile.am, libfs/src/dosfs/msdos_rename.c, libfs/src/imfs/imfs_rename.c: New files to support the rename file op.
  • libfs/src/imfs/imfs.h: Add rename interface.
  • libfs/src/imfs/imfs_init.c: Add rename handler.
  • libfs/src/imfs/miniimfs_init.c: Fix up ops struct.
  • libfs/src/dosfs/msdos.h: Add msdos_rename and remove msdos_file_link.
  • libfs/src/dosfs/msdos_create.c: Remove the link call.
  • libfs/src/dosfs/msdos_eval.c: Fix a path parsing bug.
  • libfs/src/dosfs/msdos_init.c: Add rename handler and clean up the struct naming.
  • libfs/src/rfs/rtems-rfs-link.c, libfs/src/rfs/rtems-rfs-link.h: Change the link call to allow linking of directories if told to and change the unlink to handle unlink directories that are not empty so rename can be supported.
  • libfs/src/rfs/rtems-rfs-rtems-dir.c: Fix the link/unlink calls.
  • libfs/src/rfs/rtems-rfs-rtems.c: Add a rename handler. Fix the link/unlink calls.
  • libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_format.c, libfs/src/dosfs/msdos_misc.c, httpd/asp.c, libfs/src/nfsclient/src/nfs.c: Work around a newlib warning when using the is*() family of calls.
  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 *  Init routine for MSDOS
3 *
4 *  Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
5 *  Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  @(#) $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <rtems/libio_.h>
19#include "msdos.h"
20
21const rtems_filesystem_operations_table  msdos_ops = {
22  .evalpath_h     =  msdos_eval_path,
23  .evalformake_h  =  msdos_eval4make,
24  .link_h         =  NULL,
25  .unlink_h       =  msdos_file_rmnod,
26  .node_type_h    =  msdos_node_type,
27  .mknod_h        =  msdos_mknod,
28  .chown_h        =  NULL,
29  .freenod_h      =  msdos_free_node_info,
30  .mount_h        =  NULL,
31  .fsmount_me_h   =  msdos_initialize,
32  .unmount_h      =  NULL,
33  .fsunmount_me_h =  msdos_shut_down,
34  .utime_h        =  NULL,
35  .eval_link_h    =  NULL,
36  .symlink_h      =  NULL,
37  .readlink_h     =  NULL,
38  .rename_h       =  msdos_rename,
39  .statvfs_h      =  NULL
40};
41
42/* msdos_initialize --
43 *     MSDOS filesystem initialization. Called when mounting an
44 *     MSDOS filesystem.
45 *
46 * PARAMETERS:
47 *     temp_mt_entry - mount table entry
48 *
49 * RETURNS:
50 *     RC_OK on success, or -1 if error occured (errno set apropriately).
51 *
52 */
53int msdos_initialize(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
54{
55    int rc;
56
57    rc = msdos_initialize_support(temp_mt_entry,
58                                  &msdos_ops,
59                                  &msdos_file_handlers,
60                                  &msdos_dir_handlers);
61    return rc;
62}
Note: See TracBrowser for help on using the repository browser.