projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d79839
)
fsutil: Fix writing end-of-archive marker.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 10 May 2020 15:57:52 +0000
(15:57 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 10 May 2020 15:57:52 +0000
(15:57 +0000)
This code was supposed to write two sectors but instead it wrote the same
sector twice.
Thanks to Grant A Shurtz for reporting this bug.
src/filesys/fsutil.c
patch
|
blob
|
history
diff --git
a/src/filesys/fsutil.c
b/src/filesys/fsutil.c
index 5f045d64a5ad076f02d686007687d0a93a082f90..df632df4f91665578c039154dcd07aadd34da524 100644
(file)
--- a/
src/filesys/fsutil.c
+++ b/
src/filesys/fsutil.c
@@
-215,7
+215,7
@@
fsutil_append (char **argv)
them, though, in case we have more files to append. */
memset (buffer, 0, BLOCK_SECTOR_SIZE);
block_write (dst, sector, buffer);
- block_write (dst, sector
, buffer + 1
);
+ block_write (dst, sector
+ 1, buffer
);
/* Finish up. */
file_close (src);