233
|
1 #include "../context.h"
|
|
2 #interface "fs.h"
|
|
3
|
|
4 // ----
|
|
5 // typedef struct fs_impl<Impl, Isa> impl fs{
|
|
6 // union Data* fs_impl;
|
|
7 //
|
|
8 //
|
|
9 //
|
|
10 //
|
|
11 // } fs_impl;
|
|
12 // ----
|
|
13
|
|
14 fs* createfs_impl(struct Context* cbc_context) {
|
|
15 struct fs* fs = new fs();
|
|
16 struct fs_impl* fs_impl = new fs_impl();
|
|
17 fs->fs = (union Data*)fs_impl;
|
|
18 fs_impl->fs_impl = NULL;
|
|
19 fs->readsb = C_readsbfs_impl;
|
|
20 fs->iinit = C_iinitfs_impl;
|
|
21 fs->ialloc = C_iallocfs_impl;
|
|
22 fs->iupdate = C_iupdatefs_impl;
|
|
23 fs->idup = C_idupfs_impl;
|
|
24 fs->ilock = C_ilockfs_impl;
|
|
25 fs->iunlock = C_iunlockfs_impl;
|
|
26 fs->iput = C_iputfs_impl;
|
|
27 fs->iunlockput = C_iunlockputfs_impl;
|
|
28 fs->stati = C_statifs_impl;
|
|
29 fs->readi = C_readifs_impl;
|
|
30 fs->writei = C_writeifs_impl;
|
|
31 fs->namecmp = C_namecmpfs_impl;
|
|
32 fs->dirlookup = C_dirlookupfs_impl;
|
|
33 fs->next = C_nextfs_impl;
|
|
34 fs->namei = C_nameifs_impl;
|
|
35 fs->nameiparent = C_nameiparentfs_impl;
|
|
36 return fs;
|
|
37 }
|
|
38 __code readsbfs_impl(struct fs_impl* fs, int dev, struct superblock* sb, __code next(...)) {
|
|
39
|
|
40 goto next(...);
|
|
41 }
|
|
42
|
|
43 __code iinitfs_impl(struct fs_impl* fs, __code next(...)) {
|
|
44
|
|
45 goto next(...);
|
|
46 }
|
|
47
|
|
48 __code iallocfs_impl(struct fs_impl* fs, uint dev, short type, __code next(...)) {
|
|
49
|
|
50 goto next(...);
|
|
51 }
|
|
52
|
|
53 __code iupdatefs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
54
|
|
55 goto next(...);
|
|
56 }
|
|
57
|
|
58 __code idupfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
59
|
|
60 goto next(...);
|
|
61 }
|
|
62
|
|
63 __code ilockfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
64
|
|
65 goto next(...);
|
|
66 }
|
|
67
|
|
68 __code iunlockfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
69
|
|
70 goto next(...);
|
|
71 }
|
|
72
|
|
73 __code iputfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
74
|
|
75 goto next(...);
|
|
76 }
|
|
77
|
|
78 __code iunlockputfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
79
|
|
80 goto next(...);
|
|
81 }
|
|
82
|
|
83 __code statifs_impl(struct fs_impl* fs , struct inode* ip, struct stat* st, __code next(...)) {
|
|
84
|
|
85 goto next(...);
|
|
86 }
|
|
87
|
|
88 __code readifs_impl(struct fs_impl* fs, struct inode* ip, char* dst, uint off, uint n, __code next(...)) {
|
|
89
|
|
90 goto next(...);
|
|
91 }
|
|
92
|
|
93 __code writeifs_impl(struct fs_impl* fs, struct inode* ip, char* src, uint off, uint n, __code next(...)) {
|
|
94
|
|
95 goto next(...);
|
|
96 }
|
|
97
|
|
98 __code namecmpfs_impl(struct fs_impl* fs, const char* s, const char* t, __code next(...)) {
|
|
99
|
|
100 goto next(...);
|
|
101 }
|
|
102
|
|
103 __code dirlookupfs_impl(struct inode* dp, char* name, uint* poff, __code next(...)) {
|
|
104
|
|
105 goto next(...);
|
|
106 }
|
|
107
|
|
108 __code nextfs_impl(...)) {
|
|
109
|
|
110 }
|
|
111
|
|
112 __code nameifs_impl(struct fs_impl* fs, char* path, __code next(...)) {
|
|
113
|
|
114 goto next(...);
|
|
115 }
|
|
116
|
|
117 __code nameiparentfs_impl(struct fs_impl* fs, char* path, char* name, __code next(...)) {
|
|
118
|
|
119 goto next(...);
|
|
120 }
|
|
121
|
|
122
|