libdragon
Loading...
Searching...
No Matches
include
dfsinternal.h
Go to the documentation of this file.
1
6
#ifndef __LIBDRAGON_DFSINTERNAL_H
7
#define __LIBDRAGON_DFSINTERNAL_H
8
15
#define ROOT_FLAGS 0xFFFFFFFF
17
#define ROOT_NEXT_ENTRY 0xDEADBEEF
19
#define ROOT_PATH "DragonFS 2.0"
20
22
#define SECTOR_SIZE 256
24
#define SECTOR_PAYLOAD 252
25
27
struct
directory_entry
28
{
30
uint32_t
next_entry
;
32
uint32_t
flags
;
34
char
path
[
MAX_FILENAME_LEN
+1];
36
uint32_t
file_pointer
;
37
} __attribute__((__packed__));
38
39
_Static_assert
(
sizeof
(
struct
directory_entry
) ==
SECTOR_SIZE
,
"invalid directory_entry size"
);
40
42
typedef
struct
directory_entry
directory_entry_t;
43
45
typedef
struct
dfs_open_file_s
46
{
48
uint32_t
size
;
50
uint32_t
loc
;
52
uint32_t
cart_start_loc
;
53
}
dfs_open_file_t
;
54
/* dfs */
56
57
#endif
dfs_open_file_t::size
uint32_t size
The size in bytes of this file.
Definition
dfsinternal.h:48
dfs_open_file_t::cart_start_loc
uint32_t cart_start_loc
The offset within the filesystem where the file is stored.
Definition
dfsinternal.h:52
directory_entry::flags
uint32_t flags
File size and flags. See FLAGS_FILE, FLAGS_DIR and FLAGS_EOF.
Definition
dfsinternal.h:32
directory_entry::next_entry
uint32_t next_entry
Offset to next directory entry.
Definition
dfsinternal.h:30
directory_entry::file_pointer
uint32_t file_pointer
Offset to start sector of the file.
Definition
dfsinternal.h:36
dfs_open_file_t::loc
uint32_t loc
The offset of the current location in the file.
Definition
dfsinternal.h:50
directory_entry::path
char path[MAX_FILENAME_LEN+1]
The file or directory name.
Definition
dfsinternal.h:34
SECTOR_SIZE
#define SECTOR_SIZE
The size of a sector.
Definition
dfsinternal.h:22
MAX_FILENAME_LEN
#define MAX_FILENAME_LEN
Maximum filename length.
Definition
dragonfs.h:61
dfs_open_file_t
Open file handle structure.
Definition
dfsinternal.h:46
directory_entry
Representation of a directory entry.
Definition
dfsinternal.h:28
Generated on Fri Dec 13 2024 14:13:12 for libdragon by
1.9.8