295
|
1 #include "../../context.h"
|
|
2 #interface "fs.dg"
|
294
|
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;
|
296
|
33 fs->dirlink = C_dirlinkfs_impl;
|
294
|
34 fs->namei = C_nameifs_impl;
|
|
35 fs->nameiparent = C_nameiparentfs_impl;
|
|
36 return fs;
|
|
37 }
|
298
|
38
|
|
39
|
296
|
40 __code readsbfs_impl(struct fs_impl* fs, uint dev, struct superblock* sb, __code next(...)) { //:skip
|
294
|
41
|
|
42 goto next(...);
|
|
43 }
|
|
44
|
|
45 __code iinitfs_impl(struct fs_impl* fs, __code next(...)) {
|
|
46
|
|
47 goto next(...);
|
|
48 }
|
|
49
|
|
50 __code iallocfs_impl(struct fs_impl* fs, uint dev, short type, __code next(...)) {
|
|
51
|
|
52 goto next(...);
|
|
53 }
|
|
54
|
|
55 __code iupdatefs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
56
|
|
57 goto next(...);
|
|
58 }
|
|
59
|
|
60 __code idupfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
61
|
|
62 goto next(...);
|
|
63 }
|
|
64
|
|
65 __code ilockfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
66
|
|
67 goto next(...);
|
|
68 }
|
|
69
|
|
70 __code iunlockfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
71
|
|
72 goto next(...);
|
|
73 }
|
|
74
|
|
75 __code iputfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
76
|
|
77 goto next(...);
|
|
78 }
|
|
79
|
|
80 __code iunlockputfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
|
|
81
|
|
82 goto next(...);
|
|
83 }
|
|
84
|
296
|
85 __code statifs_impl(struct fs_impl* fs , struct inode* ip, struct stat* st, __code next(...)) { //:skip
|
294
|
86
|
|
87 goto next(...);
|
|
88 }
|
|
89
|
|
90 __code readifs_impl(struct fs_impl* fs, struct inode* ip, char* dst, uint off, uint n, __code next(...)) {
|
|
91
|
|
92 goto next(...);
|
|
93 }
|
|
94
|
|
95 __code writeifs_impl(struct fs_impl* fs, struct inode* ip, char* src, uint off, uint n, __code next(...)) {
|
|
96
|
|
97 goto next(...);
|
|
98 }
|
|
99
|
|
100 __code namecmpfs_impl(struct fs_impl* fs, const char* s, const char* t, __code next(...)) {
|
|
101
|
|
102 goto next(...);
|
|
103 }
|
|
104
|
|
105 __code dirlookupfs_impl(struct inode* dp, char* name, uint* poff, __code next(...)) {
|
|
106
|
|
107 goto next(...);
|
|
108 }
|
|
109
|
296
|
110 __code dirlinkfs_impl(struct fs_impl* fs, struct inode* dp, char* name, uint inum, __code next(...)) {
|
294
|
111
|
296
|
112 goto next(...);
|
294
|
113 }
|
|
114
|
|
115 __code nameifs_impl(struct fs_impl* fs, char* path, __code next(...)) {
|
|
116
|
|
117 goto next(...);
|
|
118 }
|
|
119
|
|
120 __code nameiparentfs_impl(struct fs_impl* fs, char* path, char* name, __code next(...)) {
|
|
121
|
|
122 goto next(...);
|
|
123 }
|
|
124
|