summaryrefslogtreecommitdiff
path: root/libfat/libfatint.h
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-15 10:14:39 +0000
committerhpa <hpa>2004-12-15 10:14:39 +0000
commit7be70022dd3ae138998fc7185351b9b49ad9a9b2 (patch)
tree2599a8ede407eec131228fb607a52e22145ba1f9 /libfat/libfatint.h
parent4912df96419eff85394da1160bcb19a4dd2c1c59 (diff)
downloadsyslinux-7be70022dd3ae138998fc7185351b9b49ad9a9b2.tar.gz
Prepping for new 2.20 version: rewrite main syslinux program to support
FAT32 and EDD, and a new cleaner installer infrastructure.
Diffstat (limited to 'libfat/libfatint.h')
-rw-r--r--libfat/libfatint.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/libfat/libfatint.h b/libfat/libfatint.h
new file mode 100644
index 00000000..6da47f18
--- /dev/null
+++ b/libfat/libfatint.h
@@ -0,0 +1,56 @@
+#ident "$Id$"
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2004 H. Peter Anvin - All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+ * Boston MA 02111-1307, USA; either version 2 of the License, or
+ * (at your option) any later version; incorporated herein by reference.
+ *
+ * ----------------------------------------------------------------------- */
+
+/*
+ * libfatint.h
+ *
+ * Internals for the libfat filesystem
+ */
+
+#ifndef LIBFATINT_H
+#define LIBFATINT_H
+
+#include "libfat.h"
+#include "fat.h"
+
+struct libfat_sector {
+ libfat_sector_t n; /* Sector number */
+ struct libfat_sector *next; /* Next in list */
+ char data[LIBFAT_SECTOR_SIZE];
+};
+
+enum fat_type {
+ FAT12,
+ FAT16,
+ FAT28
+};
+
+struct libfat_filesystem {
+ int (*read)(void *, void *, size_t, libfat_sector_t);
+ void *readptr;
+
+ enum fat_type fat_type;
+ unsigned int clustsize;
+ int clustshift;
+ int32_t endcluster; /* Highest legal cluster number + 1 */
+ int32_t rootcluster; /* Root directory cluster */
+
+ libfat_sector_t fat; /* Start of FAT */
+ libfat_sector_t rootdir; /* Start of root directory */
+ libfat_sector_t data; /* Start of data area */
+ libfat_sector_t end; /* End of filesystem */
+
+ struct libfat_sector *sectors;
+};
+
+#endif /* LIBFATINT_H */