Operating System
step_3
filesystem
datablock.c
Go to the documentation of this file.
1
4
#include <stdint.h>
5
#include "
FATMacro.h
"
6
7
FAT_ITEM
media_type
= {
8
"__media_"
,
"res"
,
9
FAT_doc
,
10
0,0,0,0,0,0,0,0,0,0
11
};
12
FAT_ITEM
error_flags
= {
13
"__error_"
,
"res"
,
14
FAT_doc
15
,0,0,0,0,0,0,0,0,0,0
16
};
20
FAT_ITEM
kernel_bin
= {
21
"kernel"
,
22
"bin"
,
23
FAT_rw
|
FAT_sys
,
24
0, 0, 0, 0, 0, 0,
25
0,
26
0,
27
4,
28
512*24
// 8 sectors
29
};
30
31
FAT_ITEM
home_dir
= {
32
"home"
,
33
""
,
34
FAT_rw
|
FAT_fldr
,
35
0, 0, 0, 0, 0, 0,
36
0,
37
0,
38
12,
39
512
40
};
41
42
FAT_ITEM
dot
= {
43
"."
,
44
""
,
45
FAT_fldr
46
, 0, 0, 0, 0, 0, 0,
47
0,
48
0,
49
2,
50
512
51
};
52
FAT_ITEM
dotdot
= {
53
".."
,
54
""
,
55
FAT_fldr
56
, 0, 0, 0, 0, 0, 0,
57
0,
58
0,
59
2,
60
512
61
};
62
FAT_ITEM
msg
= {
63
"\xE5sg"
,
64
"txt"
,
65
FAT_rw
,
66
0, 0, 0, 0, 0, 0,
67
0,
68
0,
69
13,
70
0
71
};
72
FAT_ITEM
user_programQ
= {
73
"stoneQ"
,
74
"bin"
,
75
FAT_rw
,
76
0, 0, 0, 0, 0, 0,
77
0,
78
0,
79
14,
80
512*4
// 4 sectors
81
};
82
83
FAT_ITEM
user_programW
= {
84
"stoneW"
,
85
"bin"
,
86
FAT_rw
,
87
0, 0, 0, 0, 0, 0,
88
0,
89
0,
90
18,
91
512*4
// 4 sectors
92
};
93
FAT_ITEM
user_programA
= {
94
"stoneA"
,
95
"bin"
,
96
FAT_rw
,
97
0, 0, 0, 0, 0, 0,
98
0,
99
0,
100
22,
101
512*4
// 4 sectors
102
};
103
FAT_ITEM
user_programS
= {
104
"stoneS"
,
105
"bin"
,
106
FAT_rw
,
107
0, 0, 0, 0, 0, 0,
108
0,
109
0,
110
26,
111
512*4
// 4 sectors
112
};
FAT_sys
#define FAT_sys
system file
Definition:
FATMacro.h:48
FAT_ITEM
Definition:
FATMacro.h:21
user_programA
FAT_ITEM user_programA
Definition:
datablock.c:93
kernel_bin
FAT_ITEM kernel_bin
Definition:
datablock.c:20
user_programS
FAT_ITEM user_programS
Definition:
datablock.c:103
error_flags
FAT_ITEM error_flags
Definition:
datablock.c:12
msg
FAT_ITEM msg
Definition:
datablock.c:62
home_dir
FAT_ITEM home_dir
Definition:
datablock.c:31
dotdot
FAT_ITEM dotdot
Definition:
datablock.c:52
FAT_fldr
#define FAT_fldr
folder
Definition:
FATMacro.h:49
FAT_rw
#define FAT_rw
readable and writable
Definition:
FATMacro.h:45
dot
FAT_ITEM dot
Definition:
datablock.c:42
media_type
FAT_ITEM media_type
Definition:
datablock.c:7
user_programW
FAT_ITEM user_programW
Definition:
datablock.c:83
FAT_doc
#define FAT_doc
partition reserved doc
Definition:
FATMacro.h:50
user_programQ
FAT_ITEM user_programQ
Definition:
datablock.c:72
FATMacro.h
all the macro needed by FAT inner implementation
Generated by
1.8.15