source: rtems/cpukit/libfs/src/dosfs/dosfs.h @ 29e92b0

4.104.115
Last change on this file since 29e92b0 was 29e92b0, checked in by Chris Johns <chrisj@…>, on 05/31/10 at 13:56:37

2010-05-31 Chris Johns <chrisj@…>

  • libcsupport/Makefile.am: Add mount-mgr.c.
  • libcsupport/src/mount-mgr.c: New.
  • include/rtems/fs.h: Added rtems_filesystem_location_mount.
  • libcsupport/include/rtems/libio.h, libcsupport/src/mount.c: New mount interface. It is similar to Linux.
  • libcsupport/include/rtems/libio_.h: Remove the init_fs_mount_table call.
  • libcsupport/src/base_fs.c: Remove init_fs_mount_table_call. Use the new mount call. Remove setting the root node in the global pathloc. Mount does this now.
  • libcsupport/src/privateenv.c: Remove the hack to set the root mount table entry in the environment.
  • libcsupport/src/unmount.cL Free the target string.
  • libblock/src/bdpart-mount.c: New mount API.
  • libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_init.c, libfs/src/dosfs/dosfs.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_init.c, libfs/src/imfs/miniimfs_init.c, libfs/src/nfsclient/src/librtemsNfs.h, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs.h, libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h, libnetworking/rtems/tftp.h: New mount_h API.
  • libfs/src/devfs/devfs_eval.c: Local include of extern ops.
  • libfs/src/nfsclient/src/nfs.c: New mount API. Removed the mount me call and fixed the initialisation to happen when mounting.
  • libmisc/Makefile.am, libmisc/shell/shellconfig.h: Remove mount filesystem files.
  • libmisc/fsmount/fsmount.c, libmisc/fsmount/fsmount.h: Updated to the new mount table values.
  • libmisc/shell/main_mount_ftp.c, libmisc/shell/main_mount_msdos.c, libmisc/shell/main_mount_rfs.c, libmisc/shell/main_mount_tftp.c: Removed.
  • libmisc/shell/main_mount.c: Use the new mount API. Also access the file system table for the file system types.
  • libnetworking/lib/tftpDriver.c: Updated to the new mount API. Fixed to allow mounting from any mount point. Also can now have more than file system mounted.
  • sapi/include/confdefs.h: Add file system configuration support.
  • Property mode set to 100644
File size: 3.6 KB
Line 
1/**
2 *  @file rtems/dosfs.h
3 *
4 *  Application interface to MSDOS filesystem.
5 */
6
7/*
8 *  Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
9 *  Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 *
15 *  @(#) $Id$
16 */
17
18#ifndef _RTEMS_DOSFS_H
19#define _RTEMS_DOSFS_H
20
21#include <rtems.h>
22#include <rtems/libio.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28int rtems_dosfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry,
29                           const void                           *data);
30
31#define MSDOS_FMT_FATANY 0
32#define MSDOS_FMT_FAT12  1
33#define MSDOS_FMT_FAT16  2
34#define MSDOS_FMT_FAT32  3
35
36#define MSDOS_FMT_INFO_LEVEL_NONE   (0)
37#define MSDOS_FMT_INFO_LEVEL_INFO   (1)
38#define MSDOS_FMT_INFO_LEVEL_DETAIL (2)
39#define MSDOS_FMT_INFO_LEVEL_DEBUG  (3)
40
41/*
42 * data to be filled out for formatter: parameters for format call
43 * any parameter set to 0 or NULL will be automatically detected/computed
44 */
45typedef struct {
46  const char *OEMName;            /* OEM Name string or NULL               */
47  const char *VolLabel;           /* Volume Label string or NULL           */
48  uint32_t  sectors_per_cluster;  /* request value: sectors per cluster    */
49  uint32_t  fat_num;              /* request value: number of FATs on disk */
50  uint32_t  files_per_root_dir;   /* request value: file entries in root   */
51  uint8_t   fattype;              /* request value: MSDOS_FMT_FAT12/16/32  */
52  uint8_t   media;                /* media code. default: 0xF8             */
53  bool      quick_format;         /* true: do not clear out data sectors   */
54  uint32_t  cluster_align;        /* requested value: cluster alignment    */
55                                  /*   make sector number of first sector  */
56                                  /*   of first cluster divisible by this  */
57                                  /*   value. This can optimize clusters   */
58                                  /*   to be located at start of track     */
59                                  /*   or start of flash block             */
60  int       info_level;           /* The amount of info to output          */
61} msdos_format_request_param_t;
62
63/*=========================================================================*\
64| Function:                                                                 |
65\*-------------------------------------------------------------------------*/
66int msdos_format
67(
68/*-------------------------------------------------------------------------*\
69| Purpose:                                                                  |
70|     format device with msdos filesystem                                   |
71+---------------------------------------------------------------------------+
72| Input Parameters:                                                         |
73\*-------------------------------------------------------------------------*/
74 const char *devname,                        /* device name                */
75 const msdos_format_request_param_t *rqdata  /* requested fmt parameters   */
76                                             /* set to NULL for automatic  */
77                                             /* determination              */
78 );
79/*-------------------------------------------------------------------------*\
80| Return Value:                                                             |
81|    0, if success, -1 and errno if failed                                  |
82\*=========================================================================*/
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif
Note: See TracBrowser for help on using the repository browser.