Skip to content
Snippets Groups Projects
Commit 2ce40d70 authored by rtm's avatar rtm
Browse files

be clear what the root i-number is

parent be38c841
No related branches found
No related tags found
No related merge requests found
......@@ -582,7 +582,7 @@ _namei(char *path, int parent, char *name)
struct inode *ip, *next;
if(*path == '/')
ip = iget(ROOTDEV, 1);
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(cp->cwd);
......
......@@ -5,6 +5,7 @@
// Block 1 is super block.
// Inodes start at block 2.
#define ROOTINO 1 // root i-number
#define BSIZE 512 // block size
// File system super block
......
......@@ -92,7 +92,7 @@ main(int argc, char *argv[])
wsect(1, &sb);
rootino = ialloc(T_DIR);
assert(rootino == 1);
assert(rootino == ROOTINO);
bzero(&de, sizeof(de));
de.inum = xshort(rootino);
......
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