From: Ben Pfaff Date: Thu, 9 Mar 2006 05:59:39 +0000 (+0000) Subject: Fix type of sector_idx in inode_write_at(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=586d828663e6d77914946c5823bc91ed739682d0;p=pintos-anon Fix type of sector_idx in inode_write_at(). Thanks to Ryan Seth Propper for reporting this bug. --- diff --git a/src/filesys/inode.c b/src/filesys/inode.c index 777138b..8e954ab 100644 --- a/src/filesys/inode.c +++ b/src/filesys/inode.c @@ -258,7 +258,7 @@ inode_write_at (struct inode *inode, const void *buffer_, off_t size, while (size > 0) { /* Sector to write, starting byte offset within sector. */ - off_t sector_idx = byte_to_sector (inode, offset); + disk_sector_t sector_idx = byte_to_sector (inode, offset); int sector_ofs = offset % DISK_SECTOR_SIZE; /* Bytes left in inode, bytes left in sector, lesser of the two. */