projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Comments.
[pintos-anon]
/
src
/
filesys
/
inode.c
diff --git
a/src/filesys/inode.c
b/src/filesys/inode.c
index dbec4b900ef882128ef1aefd1133b70ab8396fd1..1535c7a009253140fb0f3da5fb3a519b4c463747 100644
(file)
--- a/
src/filesys/inode.c
+++ b/
src/filesys/inode.c
@@
-72,7
+72,7
@@
inode_create (struct bitmap *b, disk_sector_t sector, off_t length)
idx->data.length = length;
while (idx->data.sector_cnt < sector_cnt)
{
idx->data.length = length;
while (idx->data.sector_cnt < sector_cnt)
{
- size_t sector = bitmap_
find_and_set (b
);
+ size_t sector = bitmap_
scan_and_flip (b, 0, 1, false
);
if (sector == BITMAP_ERROR)
goto error;
if (sector == BITMAP_ERROR)
goto error;
@@
-217,7
+217,7
@@
inode_print (const struct inode *idx)
{
size_t i;
{
size_t i;
- printf ("Inode %"PRDSNu": %"PRDSNu" bytes, %z
d
sectors (",
+ printf ("Inode %"PRDSNu": %"PRDSNu" bytes, %z
u
sectors (",
idx->sector, idx->data.length, idx->data.sector_cnt);
/* This loop could be unsafe for large idx->data.sector_cnt, can
idx->sector, idx->data.length, idx->data.sector_cnt);
/* This loop could be unsafe for large idx->data.sector_cnt, can