Skip to content
Snippets Groups Projects
Commit bcca6c6b authored by rsc's avatar rsc
Browse files

shuffle fs.c in bottom-up order

parent 0655445b
No related branches found
No related tags found
No related merge requests found
......@@ -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]))
This diff is collapsed.
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment