1 /* ----------------------------------------------------------------------- *
3 * Copyright 2004-2008 H. Peter Anvin - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
16 * Internals for the libfat filesystem
25 struct libfat_sector
{
26 libfat_sector_t n
; /* Sector number */
27 struct libfat_sector
*next
; /* Next in list */
28 char data
[LIBFAT_SECTOR_SIZE
];
37 struct libfat_filesystem
{
38 int (*read
) (intptr_t, void *, size_t, libfat_sector_t
);
41 enum fat_type fat_type
;
42 unsigned int clustsize
;
44 int32_t endcluster
; /* Highest legal cluster number + 1 */
45 int32_t rootcluster
; /* Root directory cluster */
47 libfat_sector_t fat
; /* Start of FAT */
48 libfat_sector_t rootdir
; /* Start of root directory */
49 libfat_sector_t data
; /* Start of data area */
50 libfat_sector_t end
; /* End of filesystem */
52 struct libfat_sector
*sectors
;
55 #endif /* LIBFATINT_H */