8#ifndef __LIBDRAGON_DFSINTERNAL_H
9#define __LIBDRAGON_DFSINTERNAL_H
17#define ROOT_FLAGS 0xFFFFFFFF
19#define ROOT_NEXT_ENTRY 0xDEADBEEF
21#define ROOT_PATH "DragonFS 2.0"
24#define SECTOR_SIZE 256
26#define SECTOR_PAYLOAD 252
29#define DFS_LOOKUP_PRIME 31
42} __attribute__((__packed__));
50typedef struct dfs_open_file_s
61typedef struct dfs_lookup_file_s {
73typedef struct dfs_lookup_s {
uint32_t size
The size in bytes of this file.
Definition dfsinternal.h:53
uint32_t num_files
Number of files.
Definition dfsinternal.h:75
uint32_t cart_start_loc
The offset within the filesystem where the file is stored.
Definition dfsinternal.h:57
uint32_t path_hash
Hash of the path string.
Definition dfsinternal.h:63
uint32_t flags
File size and flags. See FLAGS_FILE, FLAGS_DIR and FLAGS_EOF.
Definition dfsinternal.h:37
uint32_t next_entry
Offset to next directory entry.
Definition dfsinternal.h:35
uint32_t file_pointer
Offset to start sector of the file.
Definition dfsinternal.h:41
uint32_t data_ofs
Data offset for file.
Definition dfsinternal.h:67
uint32_t loc
The offset of the current location in the file.
Definition dfsinternal.h:55
uint32_t path_ofs
Base offset for path data.
Definition dfsinternal.h:77
char path[MAX_FILENAME_LEN+1]
The file or directory name.
Definition dfsinternal.h:39
uint32_t path_ofs
Top 12 bits: length of the path string; lowest 20 bits: offset of the path string.
Definition dfsinternal.h:65
uint32_t data_len
Data length for file.
Definition dfsinternal.h:69
#define SECTOR_SIZE
The size of a sector.
Definition dfsinternal.h:24
#define MAX_FILENAME_LEN
Maximum filename length.
Definition dragonfs.h:63
Data for a single file in dfs_lookup_t.
Definition dfsinternal.h:61
Data for DFS file lookup used to speed up file open performance.
Definition dfsinternal.h:73
Open file handle structure.
Definition dfsinternal.h:51
Representation of a directory entry.
Definition dfsinternal.h:33