source: rtems/cpukit/libfs/src/dosfs/dosfs.h @ a3f1b54

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

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

  • libfs/src/dosfs/dosfs.h: Add doxygen preamble.
  • libfs/src/dosfs/msdos.h: Remove RC_OK.
  • libfs/src/dosfs/msdos_format.c: Remove unnecessary casts.
  • Property mode set to 100644
File size: 3.3 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 __DOSFS_DOSFS_H__
19#define __DOSFS_DOSFS_H__
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include <rtems.h>
26#include <rtems/libio.h>
27
28extern rtems_filesystem_operations_table  msdos_ops;
29
30#define MSDOS_FMT_FATANY 0
31#define MSDOS_FMT_FAT12  1
32#define MSDOS_FMT_FAT16  2
33#define MSDOS_FMT_FAT32  3
34
35/*
36 * data to be filled out for formatter: parameters for format call
37 * any parameter set to 0 or NULL will be automatically detected/computed
38 */
39typedef struct {
40  const char *OEMName;            /* OEM Name string or NULL               */
41  const char *VolLabel;           /* Volume Label string or NULL           */
42  uint32_t  sectors_per_cluster;  /* request value: sectors per cluster    */
43  uint32_t  fat_num;              /* request value: number of FATs on disk */
44  uint32_t  files_per_root_dir;   /* request value: file entries in root   */
45  uint8_t   fattype;              /* request value: MSDOS_FMT_FAT12/16/32  */
46  uint8_t   media;                /* media code. default: 0xF8             */
47  boolean   quick_format;         /* TRUE: do not clear out data sectors   */
48  uint32_t  cluster_align;        /* requested value: cluster alignment    */
49                                  /*   make sector number of first sector  */
50                                  /*   of first cluster divisible by this  */
51                                  /*   value. This can optimize clusters   */
52                                  /*   to be located at start of track     */
53                                  /*   or start of flash block             */
54} msdos_format_request_param_t;
55
56/*=========================================================================*\
57| Function:                                                                 |
58\*-------------------------------------------------------------------------*/
59int msdos_format
60(
61/*-------------------------------------------------------------------------*\
62| Purpose:                                                                  |
63|     format device with msdos filesystem                                   |
64+---------------------------------------------------------------------------+
65| Input Parameters:                                                         |
66\*-------------------------------------------------------------------------*/
67 const char *devname,                        /* device name                */
68 const msdos_format_request_param_t *rqdata  /* requested fmt parameters   */
69                                             /* set to NULL for automatic  */
70                                             /* determination              */
71 );
72/*-------------------------------------------------------------------------*\
73| Return Value:                                                             |
74|    0, if success, -1 and errno if failed                                  |
75\*=========================================================================*/
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif /* __DOSFS_DOSFS_H__ */
Note: See TracBrowser for help on using the repository browser.