blob: a08ad37a9a9f473f1e960aa7ab61576c68a447dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
typedef struct Qid9p1 Qid9p1;
typedef struct Dentry Dentry;
typedef struct Kfsfile Kfsfile;
typedef struct Kfs Kfs;
/* DONT TOUCH, this is the disk structure */
struct Qid9p1
{
long path;
long version;
};
//#define NAMELEN 28 /* size of names */
#define NDBLOCK 6 /* number of direct blocks in Dentry */
/* DONT TOUCH, this is the disk structure */
struct Dentry
{
char name[NAMELEN];
short uid;
short gid;
ushort mode;
/*
#define DALLOC 0x8000
#define DDIR 0x4000
#define DAPND 0x2000
#define DLOCK 0x1000
#define DREAD 0x4
#define DWRITE 0x2
#define DEXEC 0x1
*/
Qid9p1 qid;
long size;
long dblock[NDBLOCK];
long iblock;
long diblock;
long atime;
long mtime;
};
struct Kfsfile
{
Dentry;
long off;
};
struct Kfs
{
int RBUFSIZE;
int BUFSIZE;
int DIRPERBUF;
int INDPERBUF;
int INDPERBUF2;
};
extern int kfsinit(Fs*);
|