19 #define MAX_PATH 64 // Maximum path length (increasing this will
21 #define DIR_SEPARATOR '/' // character separating directory components
28 #define DFS_OK 0 // no error
29 #define DFS_EOF 1 // end of file (not an error)
30 #define DFS_WRITEPROT 2 // volume is write protected
31 #define DFS_NOTFOUND 3 // path or file not found
32 #define DFS_PATHLEN 4 // path too long
33 #define DFS_ALLOCNEW 5 // must allocate new directory cluster
34 #define DFS_ERRMISC 0xffffffff // generic error
38 #define DFS_READ 1 // read-only
39 #define DFS_WRITE 2 // write-only
43 #define SECTOR_SIZE 512 // sector size in bytes
53 #define ATTR_READ_ONLY 0x01
54 #define ATTR_HIDDEN 0x02
55 #define ATTR_SYSTEM 0x04
56 #define ATTR_VOLUME_ID 0x08
57 #define ATTR_DIRECTORY 0x10
58 #define ATTR_ARCHIVE 0x20
59 #define ATTR_LONG_NAME (ATTR_READ_ONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUME_ID)
75 typedef struct _tagDIRENT {
103 typedef struct _tagPTINFO {
125 typedef struct _tagMBR {
126 uint8_t bootcode[0x1be];
135 typedef struct _tagBPB {
166 typedef struct _tagEBPB {
181 typedef struct _tagEBPB32 {
214 typedef struct _tagLBR {
230 typedef struct _tagVOLINFO {
260 #define DFS_DI_BLANKENT 0x01 // Searching for blank entry
265 typedef struct _tagDIRINFO {
276 typedef struct _tagFILEINFO {