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