hdt: Improving CPU display
[hdt-cyring.git] / libfat / libfatint.h
blobadfad00b5bab9995c2f4c632a69cb427ce957856
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 * ----------------------------------------------------------------------- */
14 * libfatint.h
16 * Internals for the libfat filesystem
19 #ifndef LIBFATINT_H
20 #define LIBFATINT_H
22 #include "libfat.h"
23 #include "fat.h"
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];
31 enum fat_type {
32 FAT12,
33 FAT16,
34 FAT28
37 struct libfat_filesystem {
38 int (*read) (intptr_t, void *, size_t, libfat_sector_t);
39 intptr_t readptr;
41 enum fat_type fat_type;
42 unsigned int clustsize;
43 int clustshift;
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 */