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