projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Comment.
[pintos-anon]
/
src
/
filesys
/
inode.c
diff --git
a/src/filesys/inode.c
b/src/filesys/inode.c
index 8e954abc32f35c782cd04c9f0715a7291a86edbb..17f4b4680f656fdbda2e8344b36366ba478a6315 100644
(file)
--- a/
src/filesys/inode.c
+++ b/
src/filesys/inode.c
@@
-76,6
+76,9
@@
inode_create (disk_sector_t sector, off_t length)
bool success = false;
ASSERT (length >= 0);
bool success = false;
ASSERT (length >= 0);
+
+ /* If this assertion fails, the inode structure is not exactly
+ one sector in size, and you should fix that. */
ASSERT (sizeof *disk_inode == DISK_SECTOR_SIZE);
disk_inode = calloc (1, sizeof *disk_inode);
ASSERT (sizeof *disk_inode == DISK_SECTOR_SIZE);
disk_inode = calloc (1, sizeof *disk_inode);