Thanks to Ryan Seth Propper <rpropper@stanford.edu> for reporting this
bug.
while (size > 0)
{
/* Sector to write, starting byte offset within sector. */
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. */
int sector_ofs = offset % DISK_SECTOR_SIZE;
/* Bytes left in inode, bytes left in sector, lesser of the two. */