summaryrefslogtreecommitdiff
path: root/fs.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2017-08-08 13:27:06 -0400
committerRobert Morris <[email protected]>2017-08-08 13:27:06 -0400
commit14270288b7e5327832cdf6a8d9da52ef58fce652 (patch)
treeb604cb49fb049a14966418eda4589cd1271f8e53 /fs.c
parentaba8423c4a5ae01828040d04f668f07ec544dcd0 (diff)
parent825ce074b10a0e1f63fd3a1fe245220d04054e0a (diff)
downloadxv6-labs-14270288b7e5327832cdf6a8d9da52ef58fce652.tar.gz
xv6-labs-14270288b7e5327832cdf6a8d9da52ef58fce652.tar.bz2
xv6-labs-14270288b7e5327832cdf6a8d9da52ef58fce652.zip
Merge branch 'master' of g.csail.mit.edu:xv6-dev
Diffstat (limited to 'fs.c')
-rw-r--r--fs.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs.c b/fs.c
index 4232f6a..d438833 100644
--- a/fs.c
+++ b/fs.c
@@ -169,7 +169,7 @@ iinit(int dev)
for(i = 0; i < NINODE; i++) {
initsleeplock(&icache.inode[i].lock, "inode");
}
-
+
readsb(dev, &sb);
cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\
inodestart %d bmap start %d\n", sb.size, sb.nblocks,
@@ -451,13 +451,6 @@ readi(struct inode *ip, char *dst, uint off, uint n)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
m = min(n - tot, BSIZE - off%BSIZE);
- /*
- cprintf("data off %d:\n", off);
- for (int j = 0; j < min(m, 10); j++) {
- cprintf("%x ", bp->data[off%BSIZE+j]);
- }
- cprintf("\n");
- */
memmove(dst, bp->data + off%BSIZE, m);
brelse(bp);
}
@@ -617,7 +610,7 @@ namex(char *path, int nameiparent, char *name)
if(*path == '/')
ip = iget(ROOTDEV, ROOTINO);
else
- ip = idup(proc->cwd);
+ ip = idup(myproc()->cwd);
while((path = skipelem(path, name)) != 0){
ilock(ip);