summaryrefslogtreecommitdiff
path: root/fs.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2016-08-25 09:13:00 -0400
committerFrans Kaashoek <[email protected]>2016-08-25 09:13:00 -0400
commit7894fcd21732dd2ddfbb9beca52d037a62ed11f4 (patch)
treeeabcfc4f08613dcf7c35e58d9425f02c4c65224f /fs.c
parent6de6a3c952dc8786619bd052e26e6bc1c97be2e6 (diff)
downloadxv6-labs-7894fcd21732dd2ddfbb9beca52d037a62ed11f4.tar.gz
xv6-labs-7894fcd21732dd2ddfbb9beca52d037a62ed11f4.tar.bz2
xv6-labs-7894fcd21732dd2ddfbb9beca52d037a62ed11f4.zip
Remove trailing white space with:
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done (Thanks to Nicolás Wolovick)
Diffstat (limited to 'fs.c')
-rw-r--r--fs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs.c b/fs.c
index 025b326..f800b77 100644
--- a/fs.c
+++ b/fs.c
@@ -5,7 +5,7 @@
// + Directories: inode with special contents (list of other inodes!)
// + Names: paths like /usr/rtm/xv6/fs.c for convenient naming.
//
-// This file contains the low-level file system manipulation
+// This file contains the low-level file system manipulation
// routines. The (higher-level) system call implementations
// are in sysfile.c.
@@ -29,7 +29,7 @@ void
readsb(int dev, struct superblock *sb)
{
struct buf *bp;
-
+
bp = bread(dev, 1);
memmove(sb, bp->data, sizeof(*sb));
brelse(bp);
@@ -40,14 +40,14 @@ static void
bzero(int dev, int bno)
{
struct buf *bp;
-
+
bp = bread(dev, bno);
memset(bp->data, 0, BSIZE);
log_write(bp);
brelse(bp);
}
-// Blocks.
+// Blocks.
// Allocate a zeroed disk block.
static uint
@@ -348,7 +348,7 @@ iunlockput(struct inode *ip)
//
// The content (data) associated with each inode is stored
// in blocks on the disk. The first NDIRECT block numbers
-// are listed in ip->addrs[]. The next NINDIRECT blocks are
+// are listed in ip->addrs[]. The next NINDIRECT blocks are
// listed in block ip->addrs[NDIRECT].
// Return the disk block address of the nth block in inode ip.
@@ -401,7 +401,7 @@ itrunc(struct inode *ip)
ip->addrs[i] = 0;
}
}
-
+
if(ip->addrs[NDIRECT]){
bp = bread(ip->dev, ip->addrs[NDIRECT]);
a = (uint*)bp->data;
@@ -554,7 +554,7 @@ dirlink(struct inode *dp, char *name, uint inum)
de.inum = inum;
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("dirlink");
-
+
return 0;
}