source: rtems/cpukit/libfs/src/dosfs/dosfs.h @ 8f56a709

4.104.114.84.95
Last change on this file since 8f56a709 was c36f885a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/20/04 at 03:11:41

2004-11-20 Ralf Corsepius <ralf.corsepiu@…>

PR 720/filesystem:

  • libfs/src/dosfs/dosfs.h, libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h, libfs/src/dosfs/msdos_format.c: Adaptations to msdos_format. (From Thomas Doerfler <Thomas.Doerfler@…>).
  • libfs/src/dosfs/dosfs.h, libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h, libfs/src/dosfs/msdos_format.c: Adaptations to RTEMS-4.7.
  • Property mode set to 100644
File size: 3.3 KB
Line 
1/*
2 *  dosfs.h
3 *
4 *  Application interface to MSDOS filesystem.
5 *
6 *  Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
7 *  Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  @(#) $Id$
14 */
15 
16#ifndef __DOSFS_DOSFS_H__
17#define __DOSFS_DOSFS_H__
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems.h>
24#include <rtems/libio.h>
25
26extern rtems_filesystem_operations_table  msdos_ops;
27
28#define MSDOS_FMT_FATANY 0
29#define MSDOS_FMT_FAT12  1
30#define MSDOS_FMT_FAT16  2
31#define MSDOS_FMT_FAT32  3
32
33/*
34 * data to be filled out for formatter: parameters for format call
35 * any parameter set to 0 or NULL will be automatically detected/computed
36 */
37typedef struct {
38  const char *OEMName;            /* OEM Name string or NULL               */
39  const char *VolLabel;           /* Volume Label string or NULL           */
40  uint32_t  sectors_per_cluster;  /* request value: sectors per cluster    */
41  uint32_t  fat_num;              /* request value: number of FATs on disk */
42  uint32_t  files_per_root_dir;   /* request value: file entries in root   */
43  uint8_t   fattype;              /* request value: MSDOS_FMT_FAT12/16/32  */
44  uint8_t   media;                /* media code. default: 0xF8             */
45  boolean   quick_format;         /* TRUE: do not clear out data sectors   */
46  uint32_t  cluster_align;        /* requested value: cluster alignment    */
47                                  /*   make sector number of first sector  */
48                                  /*   of first cluster divisible by this  */
49                                  /*   value. This can optimize clusters   */
50                                  /*   to be located at start of track     */
51                                  /*   or start of flash block             */
52} msdos_format_request_param_t;
53
54/*=========================================================================*\
55| Function:                                                                 |
56\*-------------------------------------------------------------------------*/
57int msdos_format
58(
59/*-------------------------------------------------------------------------*\
60| Purpose:                                                                  |
61|     format device with msdos filesystem                                   |
62+---------------------------------------------------------------------------+
63| Input Parameters:                                                         |
64\*-------------------------------------------------------------------------*/
65 const char *devname,                        /* device name                */
66 const msdos_format_request_param_t *rqdata  /* requested fmt parameters   */
67                                             /* set to NULL for automatic  */
68                                             /* determination              */
69 );
70/*-------------------------------------------------------------------------*\
71| Return Value:                                                             |
72|    0, if success, -1 and errno if failed                                  |
73\*=========================================================================*/
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif /* __DOSFS_DOSFS_H__ */
Note: See TracBrowser for help on using the repository browser.