From 7894fcd21732dd2ddfbb9beca52d037a62ed11f4 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Thu, 25 Aug 2016 09:13:00 -0400 Subject: =?UTF-8?q?Remove=20trailing=20white=20space=20with:=20=20for=20f?= =?UTF-8?q?=20in=20*.{h,c};=20do=20sed=20-i=20.sed=20's/[[:blank:]]*$//'?= =?UTF-8?q?=20$f;=20done=20(Thanks=20to=20Nicol=C3=A1s=20Wolovick)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'fs.c') 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; } -- cgit v1.2.3