提交 bcca6c6b 创建 作者: rsc's avatar rsc

shuffle fs.c in bottom-up order

上级 0655445b
......@@ -120,7 +120,6 @@ void bwrite(struct buf*, uint);
void brelse(struct buf*);
// fs.c
extern uint rootdev;
void iinit(void);
struct inode* iget(uint, uint);
void ilock(struct inode*);
......@@ -138,6 +137,7 @@ struct inode* mknod1(struct inode*, char*, short, short, short);
int unlink(char*);
void iupdate(struct inode*);
int link(char*, char*);
struct inode* igetroot(void);
// number of elements in fixed-size array
#define NELEM(x) (sizeof(x)/sizeof((x)[0]))
差异被折叠。
......@@ -55,5 +55,3 @@ struct dirent {
char name[DIRSIZ];
};
extern uint rootdev; // Device number of root file system
......@@ -14,7 +14,7 @@ struct inode {
uint addrs[NADDRS];
};
extern uint rootdev;
#define ROOTDEV 1 // Device number of root file system
#define NAMEI_LOOKUP 1
#define NAMEI_CREATE 2
......
......@@ -125,7 +125,7 @@ process0(void)
release(&proc_table_lock);
p0 = &proc[0];
p0->cwd = iget(rootdev, 1);
p0->cwd = igetroot();
iunlock(p0->cwd);
// Dummy user memory to make copyproc() happy.
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论