source: rtems/cpukit/libfs/src/dosfs/fat.h @ 53da07e

4.115
Last change on this file since 53da07e was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 17.9 KB
Line 
1/*
2 *  fat.h
3 *
4 *  Constants/data structures/prototypes for low-level operations on a volume
5 *  with FAT filesystem
6 *
7 *  Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
8 *  Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 */
14
15#ifndef __DOSFS_FAT_H__
16#define __DOSFS_FAT_H__
17
18#include <string.h>
19
20#include <rtems/seterr.h>
21
22#include <rtems/score/cpu.h>
23#include <errno.h>
24#include <rtems/bdbuf.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#ifndef RC_OK
31#define RC_OK 0
32#endif
33
34/*
35 * Remember that all FAT file system on disk data structure is
36 * "little endian"!
37 * (derived from linux)
38 */
39/*
40 * Conversion from and to little-endian byte order. (no-op on i386/i486)
41 *
42 * Naming: Ca_b_c, where a: F = from, T = to, b: LE = little-endian,
43 * BE = big-endian, c: W = word (16 bits), L = longword (32 bits)
44 */
45
46#if (CPU_BIG_ENDIAN == TRUE)
47#    define CF_LE_W(v) CPU_swap_u16((uint16_t)(v))
48#    define CF_LE_L(v) CPU_swap_u32((uint32_t)(v))
49#    define CT_LE_W(v) CPU_swap_u16((uint16_t)(v))
50#    define CT_LE_L(v) CPU_swap_u32((uint32_t)(v))
51#else
52#    define CF_LE_W(v) (v)
53#    define CF_LE_L(v) (v)
54#    define CT_LE_W(v) (v)
55#    define CT_LE_L(v) (v)
56#endif
57
58#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
59
60#define FAT_HASH_SIZE   2
61#define FAT_HASH_MODULE FAT_HASH_SIZE
62
63
64#define FAT_SECTOR512_SIZE     512 /* sector size (bytes) */
65#define FAT_SECTOR512_BITS       9 /* log2(SECTOR_SIZE) */
66
67/* maximum + 1 number of clusters for FAT12 */
68#define FAT_FAT12_MAX_CLN      4085
69
70/* maximum + 1 number of clusters for FAT16 */
71#define FAT_FAT16_MAX_CLN      65525
72
73#define FAT_FAT12              0x01
74#define FAT_FAT16              0x02
75#define FAT_FAT32              0x04
76
77#define FAT_UNDEFINED_VALUE     (uint32_t)0xFFFFFFFF
78
79#define FAT_FAT12_EOC          0x0FF8
80#define FAT_FAT16_EOC          0xFFF8
81#define FAT_FAT32_EOC          (uint32_t)0x0FFFFFF8
82
83#define FAT_FAT12_FREE         0x0000
84#define FAT_FAT16_FREE         0x0000
85#define FAT_FAT32_FREE         0x00000000
86
87#define FAT_GENFAT_EOC         (uint32_t)0xFFFFFFFF
88#define FAT_GENFAT_FREE        (uint32_t)0x00000000
89
90#define FAT_FAT12_SHIFT        0x04
91
92#define FAT_FAT12_MASK         0x00000FFF
93#define FAT_FAT16_MASK         0x0000FFFF
94#define FAT_FAT32_MASK         (uint32_t)0x0FFFFFFF
95
96#define FAT_MAX_BPB_SIZE       90
97#define FAT_TOTAL_MBR_SIZE    512
98
99/* size of useful information in FSInfo sector */
100#define FAT_USEFUL_INFO_SIZE   12
101
102#define FAT_GET_ADDR(x, ofs)       ((uint8_t *)(x) + (ofs))
103
104#define FAT_GET_VAL8(x, ofs)       (uint8_t)(*((uint8_t *)(x) + (ofs)))
105
106#define FAT_GET_VAL16(x, ofs)                               \
107    (uint16_t)( (*((uint8_t *)(x) + (ofs))) |           \
108                  ((*((uint8_t *)(x) + (ofs) + 1)) << 8) )
109
110#define FAT_GET_VAL32(x, ofs)                                             \
111    (uint32_t)( (uint32_t)(*((uint8_t *)(x) + (ofs))) |             \
112                  ((uint32_t)(*((uint8_t *)(x) + (ofs) + 1)) << 8)  | \
113                  ((uint32_t)(*((uint8_t *)(x) + (ofs) + 2)) << 16) | \
114                  ((uint32_t)(*((uint8_t *)(x) + (ofs) + 3)) << 24) )
115
116#define FAT_SET_VAL8(x, ofs,val)                    \
117                 (*((uint8_t *)(x)+(ofs))=(uint8_t)(val))
118
119#define FAT_SET_VAL16(x, ofs,val) do {              \
120                 FAT_SET_VAL8((x),(ofs),(val));     \
121                 FAT_SET_VAL8((x),(ofs)+1,(val)>>8);\
122                 } while (0)
123
124#define FAT_SET_VAL32(x, ofs,val) do {               \
125                 uint32_t val1 = val;                \
126                 FAT_SET_VAL16((x),(ofs),(val1)&0xffff);\
127                 FAT_SET_VAL16((x),(ofs)+2,(val1)>>16);\
128                 } while (0)
129
130/* macros to access boot sector fields */
131#define FAT_GET_BR_JMPBOOT(x)                FAT_GET_VAL8( x,  0)
132#define FAT_SET_BR_JMPBOOT(x,val)            FAT_SET_VAL8( x,  0,val)
133
134#define FAT_GET_ADDR_BR_OEMNAME(x)           FAT_GET_ADDR( x,  3)
135#define FAT_BR_OEMNAME_SIZE              (8)
136
137#define FAT_GET_BR_BYTES_PER_SECTOR(x)       FAT_GET_VAL16(x, 11)
138#define FAT_SET_BR_BYTES_PER_SECTOR(x,val)   FAT_SET_VAL16(x, 11,val)
139
140#define FAT_GET_BR_SECTORS_PER_CLUSTER(x)    FAT_GET_VAL8( x, 13)
141#define FAT_SET_BR_SECTORS_PER_CLUSTER(x,val)FAT_SET_VAL8( x, 13,val)
142
143#define FAT_GET_BR_RESERVED_SECTORS_NUM(x)   FAT_GET_VAL16(x, 14)
144#define FAT_SET_BR_RESERVED_SECTORS_NUM(x,val) FAT_SET_VAL16(x, 14,val)
145
146#define FAT_GET_BR_FAT_NUM(x)                FAT_GET_VAL8( x, 16)
147#define FAT_SET_BR_FAT_NUM(x,val)            FAT_SET_VAL8( x, 16,val)
148
149#define FAT_GET_BR_FILES_PER_ROOT_DIR(x)     FAT_GET_VAL16(x, 17)
150#define FAT_SET_BR_FILES_PER_ROOT_DIR(x,val) FAT_SET_VAL16(x, 17,val)
151
152#define FAT_GET_BR_TOTAL_SECTORS_NUM16(x)    FAT_GET_VAL16(x, 19)
153#define FAT_SET_BR_TOTAL_SECTORS_NUM16(x,val)FAT_SET_VAL16(x, 19,val)
154
155#define FAT_GET_BR_MEDIA(x)                  FAT_GET_VAL8( x, 21)
156#define FAT_SET_BR_MEDIA(x,val)              FAT_SET_VAL8( x, 21,val)
157
158#define FAT_GET_BR_SECTORS_PER_FAT(x)        FAT_GET_VAL16(x, 22)
159#define FAT_SET_BR_SECTORS_PER_FAT(x,val)    FAT_SET_VAL16(x, 22,val)
160
161#define FAT_GET_BR_SECTORS_PER_TRACK(x)      FAT_GET_VAL16(x, 24)
162#define FAT_SET_BR_SECTORS_PER_TRACK(x,val)  FAT_SET_VAL16(x, 24,val)
163
164#define FAT_GET_BR_NUMBER_OF_HEADS(x)        FAT_GET_VAL16(x, 26)
165#define FAT_SET_BR_NUMBER_OF_HEADS(x,val)    FAT_SET_VAL16(x, 26,val)
166
167#define FAT_GET_BR_HIDDEN_SECTORS(x)         FAT_GET_VAL32(x, 28)
168#define FAT_SET_BR_HIDDEN_SECTORS(x,val)     FAT_SET_VAL32(x, 28,val)
169
170#define FAT_GET_BR_TOTAL_SECTORS_NUM32(x)    FAT_GET_VAL32(x, 32)
171#define FAT_SET_BR_TOTAL_SECTORS_NUM32(x,val) FAT_SET_VAL32(x, 32,val)
172  /* --- start of FAT12/16 specific fields */
173#define FAT_GET_BR_DRVNUM(x)                 FAT_GET_VAL8( x, 36)
174#define FAT_SET_BR_DRVNUM(x,val)             FAT_SET_VAL8( x, 36,val)
175
176#define FAT_GET_BR_RSVD1(x)                  FAT_GET_VAL8( x, 37)
177#define FAT_SET_BR_RSVD1(x,val)              FAT_SET_VAL8( x, 37,val)
178
179#define FAT_GET_BR_BOOTSIG(x)                FAT_GET_VAL8( x, 38)
180#define FAT_SET_BR_BOOTSIG(x,val)            FAT_SET_VAL8( x, 38,val)
181#define FAT_BR_BOOTSIG_VAL               (0x29)
182
183#define FAT_GET_BR_VOLID(x)                  FAT_GET_VAL32(x, 39)
184#define FAT_SET_BR_VOLID(x,val)              FAT_SET_VAL32(x, 39,val)
185
186#define FAT_GET_ADDR_BR_VOLLAB(x)            FAT_GET_ADDR (x, 43)
187#define FAT_BR_VOLLAB_SIZE               (11)
188
189#define FAT_GET_ADDR_BR_FILSYSTYPE(x)        FAT_GET_ADDR (x, 54)
190#define FAT_BR_FILSYSTYPE_SIZE           (8)
191  /* --- end of FAT12/16 specific fields */
192  /* --- start of FAT32 specific fields */
193#define FAT_GET_BR_SECTORS_PER_FAT32(x)      FAT_GET_VAL32(x, 36)
194#define FAT_SET_BR_SECTORS_PER_FAT32(x,val)  FAT_SET_VAL32(x, 36,val)
195
196#define FAT_GET_BR_EXT_FLAGS(x)              FAT_GET_VAL16(x, 40)
197#define FAT_SET_BR_EXT_FLAGS(x,val)          FAT_SET_VAL16(x, 40,val)
198
199#define FAT_GET_BR_FSVER(x)                  FAT_GET_VAL16(x, 42)
200#define FAT_SET_BR_FSVER(x,val)              FAT_SET_VAL16(x, 42,val)
201
202#define FAT_GET_BR_FAT32_ROOT_CLUSTER(x)     FAT_GET_VAL32(x, 44)
203#define FAT_SET_BR_FAT32_ROOT_CLUSTER(x,val) FAT_SET_VAL32(x, 44,val)
204
205#define FAT_GET_BR_FAT32_FS_INFO_SECTOR(x)   FAT_GET_VAL16(x, 48)
206#define FAT_SET_BR_FAT32_FS_INFO_SECTOR(x,val) FAT_SET_VAL16(x, 48,val)
207
208#define FAT_GET_BR_FAT32_BK_BOOT_SECTOR(x)   FAT_GET_VAL16(x, 50)
209#define FAT_SET_BR_FAT32_BK_BOOT_SECTOR(x,val)  FAT_SET_VAL16(x, 50,val)
210
211#define FAT_GET_ADDR_BR_FAT32_RESERVED(x)    FAT_GET_ADDR (x, 52)
212#define FAT_BR_FAT32_RESERVED_SIZE       (12)
213
214#define FAT_GET_BR_FAT32_DRVNUM(x)           FAT_GET_VAL8( x, 64)
215#define FAT_SET_BR_FAT32_DRVNUM(x,val)       FAT_SET_VAL8( x, 64,val)
216
217#define FAT_GET_BR_FAT32_RSVD1(x)            FAT_GET_VAL8( x, 65)
218#define FAT_SET_BR_FAT32_RSVD1(x,val)        FAT_SET_VAL8( x, 65,val)
219
220#define FAT_GET_BR_FAT32_BOOTSIG(x)          FAT_GET_VAL8( x, 66)
221#define FAT_SET_BR_FAT32_BOOTSIG(x,val)      FAT_SET_VAL8( x, 66,val)
222#define FAT_BR_FAT32_BOOTSIG_VAL         (0x29)
223
224#define FAT_GET_BR_FAT32_VOLID(x)            FAT_GET_VAL32(x, 67)
225#define FAT_SET_BR_FAT32_VOLID(x,val)        FAT_SET_VAL32(x, 67,val)
226
227#define FAT_GET_ADDR_BR_FAT32_VOLLAB(x)      FAT_GET_ADDR (x, 71)
228#define FAT_BR_FAT32_VOLLAB_SIZE         (11)
229
230#define FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(x)  FAT_GET_ADDR (x, 82)
231#define FAT_BR_FAT32_FILSYSTYPE_SIZE     (8)
232  /* --- end of FAT32 specific fields */
233
234#define FAT_GET_BR_SIGNATURE(x)              FAT_GET_VAL16(x,510)
235#define FAT_SET_BR_SIGNATURE(x,val)          FAT_SET_VAL16(x,510,val)
236#define FAT_BR_SIGNATURE_VAL                (0xAA55)
237
238  /*
239   * FAT32 FSINFO description
240   */
241#define FAT_GET_FSINFO_LEAD_SIGNATURE(x)      FAT_GET_VAL32(x,  0)
242#define FAT_SET_FSINFO_LEAD_SIGNATURE(x,val)  FAT_SET_VAL32(x,  0,val)
243#define FAT_FSINFO_LEAD_SIGNATURE_VALUE   (0x41615252)
244
245#define FAT_GET_FSINFO_STRUC_SIGNATURE(x)     FAT_GET_VAL32(x,484)
246#define FAT_SET_FSINFO_STRUC_SIGNATURE(x,val) FAT_SET_VAL32(x,484,val)
247#define FAT_FSINFO_STRUC_SIGNATURE_VALUE  (0x61417272)
248
249#define FAT_GET_FSINFO_TRAIL_SIGNATURE(x)     FAT_GET_VAL32(x,508)
250#define FAT_SET_FSINFO_TRAIL_SIGNATURE(x,val) FAT_SET_VAL32(x,508,val)
251#define FAT_FSINFO_TRAIL_SIGNATURE_VALUE  (0xAA550000)
252/*
253 * I read FSInfo sector from offset 484 to access the information, so offsets
254 * of these fields a relative
255 */
256#define FAT_GET_FSINFO_FREE_CLUSTER_COUNT(x)      FAT_GET_VAL32(x, 4)
257#define FAT_SET_FSINFO_FREE_CLUSTER_COUNT(x,val)  FAT_SET_VAL32(x, 4,val)
258#define FAT_GET_FSINFO_NEXT_FREE_CLUSTER(x)       FAT_GET_VAL32(x, 8)
259#define FAT_SET_FSINFO_NEXT_FREE_CLUSTER(x,val)   FAT_SET_VAL32(x, 8,val)
260
261#define FAT_FSI_INFO                         484
262#define FAT_FSINFO_STRUCT_OFFSET             488
263#define FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET (FAT_FSINFO_STRUCT_OFFSET+0)
264
265#define FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET  (FAT_FSINFO_STRUCT_OFFSET+4)
266
267#define FAT_RSRVD_CLN                        0x02
268
269#define FAT_FSI_LEADSIG_SIZE                 0x04
270
271#define FAT_TOTAL_FSINFO_SIZE               512
272
273#define MS_BYTES_PER_CLUSTER_LIMIT           0x8000     /* 32K */
274
275#define FAT_BR_EXT_FLAGS_MIRROR              0x0080
276
277#define FAT_BR_EXT_FLAGS_FAT_NUM             0x000F
278
279#define FAT_BR_MEDIA_FIXED                  0xf8
280
281#define FAT_DIRENTRY_SIZE          32
282
283#define FAT_DIRENTRIES_PER_SEC512  16
284
285/*
286 * Volume descriptor
287 * Description of the volume the FAT filesystem is located on - generally
288 * the fields of the structure correspond to Boot Sector and BPB Structure
289 * fields
290 */
291typedef struct fat_vol_s
292{
293    uint16_t           bps;            /* bytes per sector */
294    uint8_t            sec_log2;       /* log2 of bps */
295    uint8_t            sec_mul;        /* log2 of 512bts sectors number per sector */
296    uint8_t            spc;            /* sectors per cluster */
297    uint8_t            spc_log2;       /* log2 of spc */
298    uint16_t           bpc;            /* bytes per cluster */
299    uint8_t            bpc_log2;       /* log2 of bytes per cluster */
300    uint8_t            fats;           /* number of FATs */
301    uint8_t            type;           /* FAT type */
302    uint32_t           mask;
303    uint32_t           eoc_val;
304    uint16_t           fat_loc;        /* FAT start */
305    uint32_t           fat_length;     /* sectors per FAT */
306    uint32_t           rdir_loc;       /* root directory start */
307    uint16_t           rdir_entrs;     /* files per root directory */
308    uint32_t           rdir_secs;      /* sectors per root directory */
309    uint32_t           rdir_size;      /* root directory size in bytes */
310    uint32_t           tot_secs;       /* total count of sectors */
311    uint32_t           data_fsec;      /* first data sector */
312    uint32_t           data_cls;       /* count of data clusters */
313    uint32_t           rdir_cl;        /* first cluster of the root directory */
314    uint16_t           info_sec;       /* FSInfo Sector Structure location */
315    uint32_t           free_cls;       /* last known free clusters count */
316    uint32_t           next_cl;        /* next free cluster number */
317    uint8_t            mirror;         /* mirroring enabla/disable */
318    uint32_t           afat_loc;       /* active FAT location */
319    uint8_t            afat;           /* the number of active FAT */
320    int                fd;             /* the disk device file descriptor */
321    rtems_disk_device *dd;             /* disk device (see libblock) */
322    void              *private_data;   /* reserved */
323} fat_vol_t;
324
325
326typedef struct fat_cache_s
327{
328    uint32_t            blk_num;
329    bool                modified;
330    uint8_t             state;
331    rtems_bdbuf_buffer *buf;
332} fat_cache_t;
333
334/*
335 * This structure identifies the instance of the filesystem on the FAT
336 * ("fat-file") level.
337 */
338typedef struct fat_fs_info_s
339{
340    fat_vol_t            vol;           /* volume descriptor */
341    rtems_chain_control *vhash;         /* "vhash" of fat-file descriptors */
342    rtems_chain_control *rhash;         /* "rhash" of fat-file descriptors */
343    char                *uino;          /* array of unique ino numbers */
344    uint32_t             index;
345    uint32_t             uino_pool_size; /* size */
346    uint32_t             uino_base;
347    fat_cache_t          c;             /* cache */
348    uint8_t             *sec_buf; /* just placeholder for anything */
349} fat_fs_info_t;
350
351/*
352 * FAT position is a the cluster and the offset into the
353 * cluster.
354 */
355typedef struct fat_pos_s
356{
357    uint32_t   cln;
358    uint32_t   ofs;
359} fat_pos_t;
360
361/*
362 * If the name we looking for is file we store not only first data cluster
363 * number, but and cluster number and offset for directory entry for this
364 * name. We also add the LFN start offset so we can delete it the whole
365 * file name. We can then use this to delete the file.
366 */
367typedef struct fat_dir_pos_s
368{
369    fat_pos_t  sname;
370    fat_pos_t  lname;
371} fat_dir_pos_t;
372
373/*
374 * Set the long name entries to this value for a short file name.
375 */
376#define FAT_FILE_SHORT_NAME (0xffffffff)
377
378#define FAT_FAT_OFFSET(fat_type, cln)                  \
379    ((fat_type) & FAT_FAT12 ? ((cln) + ((cln) >> 1)) : \
380     (fat_type) & FAT_FAT16 ? ((cln) << 1)           : \
381     ((cln) << 2))
382
383#define FAT_CLUSTER_IS_ODD(n)  ((n) & 0x0001)
384
385#define FAT12_SHIFT      0x4    /* half of a byte */
386
387/* initial size of array of unique ino */
388#define FAT_UINO_POOL_INIT_SIZE  0x100
389
390/* cache support */
391#define FAT_CACHE_EMPTY   0x0
392#define FAT_CACHE_ACTUAL  0x1
393
394#define FAT_OP_TYPE_READ  0x1
395#define FAT_OP_TYPE_GET   0x2
396
397static inline void
398fat_dir_pos_init(
399    fat_dir_pos_t *dir_pos
400    )
401{
402  dir_pos->sname.cln = 0;
403  dir_pos->sname.ofs = 0;
404  dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
405  dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
406}
407
408static inline uint32_t
409fat_cluster_num_to_sector_num(
410    rtems_filesystem_mount_table_entry_t *mt_entry,
411    uint32_t                              cln
412    )
413{
414    register fat_fs_info_t *fs_info = mt_entry->fs_info;
415
416    if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
417        return fs_info->vol.rdir_loc;
418
419    return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
420            fs_info->vol.data_fsec);
421}
422
423static inline uint32_t
424fat_cluster_num_to_sector512_num(
425    rtems_filesystem_mount_table_entry_t *mt_entry,
426    uint32_t                              cln
427    )
428{
429    fat_fs_info_t *fs_info = mt_entry->fs_info;
430
431    if (cln == 1)
432        return 1;
433
434    return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
435            fs_info->vol.sec_mul);
436}
437
438static inline void
439fat_buf_mark_modified(fat_fs_info_t *fs_info)
440{
441    fs_info->c.modified = true;
442}
443
444int
445fat_buf_access(fat_fs_info_t *fs_info, uint32_t   blk, int op_type,
446               rtems_bdbuf_buffer **buf);
447
448int
449fat_buf_release(fat_fs_info_t *fs_info);
450
451ssize_t
452_fat_block_read(rtems_filesystem_mount_table_entry_t *mt_entry,
453                uint32_t                              start,
454                uint32_t                              offset,
455                uint32_t                              count,
456                void                                 *buff);
457
458ssize_t
459_fat_block_write(rtems_filesystem_mount_table_entry_t *mt_entry,
460                 uint32_t                              start,
461                 uint32_t                              offset,
462                 uint32_t                              count,
463                 const void                           *buff);
464
465int
466_fat_block_zero(rtems_filesystem_mount_table_entry_t *mt_entry,
467                 uint32_t                              start,
468                 uint32_t                              offset,
469                 uint32_t                              count);
470
471int
472_fat_block_release(rtems_filesystem_mount_table_entry_t *mt_entry);
473
474ssize_t
475fat_cluster_read(rtems_filesystem_mount_table_entry_t *mt_entry,
476                  uint32_t                             cln,
477                  void                                *buff);
478
479ssize_t
480fat_cluster_write(rtems_filesystem_mount_table_entry_t *mt_entry,
481                   uint32_t                             cln,
482                   const void                          *buff);
483
484int
485fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry);
486
487int
488fat_init_clusters_chain(rtems_filesystem_mount_table_entry_t *mt_entry,
489                        uint32_t                              start_cln);
490
491uint32_t
492fat_cluster_num_to_sector_num(rtems_filesystem_mount_table_entry_t *mt_entry,
493                              uint32_t                              cln);
494
495int
496fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry);
497
498
499uint32_t
500fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry);
501
502bool
503fat_ino_is_unique(rtems_filesystem_mount_table_entry_t *mt_entry,
504                  uint32_t                              ino);
505
506void
507fat_free_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry,
508                    uint32_t                              ino);
509
510int
511fat_fat32_update_fsinfo_sector(
512  rtems_filesystem_mount_table_entry_t *mt_entry,
513  uint32_t                              free_count,
514  uint32_t                              next_free
515  );
516
517#ifdef __cplusplus
518}
519#endif
520
521#endif /* __DOSFS_FAT_H__ */
Note: See TracBrowser for help on using the repository browser.