projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7bc12f
)
Fix type of sector_idx in inode_write_at().
author
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 9 Mar 2006 05:59:39 +0000
(
05:59
+0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 9 Mar 2006 05:59:39 +0000
(
05:59
+0000)
Thanks to Ryan Seth Propper <rpropper@stanford.edu> for reporting this
bug.
src/filesys/inode.c
patch
|
blob
|
history
diff --git
a/src/filesys/inode.c
b/src/filesys/inode.c
index 777138b10f479530cb3daed59c5b331e2af1050a..8e954abc32f35c782cd04c9f0715a7291a86edbb 100644
(file)
--- 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. */