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]
/
grading
/
filesys
/
child-syn-wrt.c
diff --git
a/grading/filesys/child-syn-wrt.c
b/grading/filesys/child-syn-wrt.c
index 2a5728153cfb708273873c2ac8d8ca30f9dcec53..0a43f5a7f008418eee3bf06fe21068df97289850 100644
(file)
--- a/
grading/filesys/child-syn-wrt.c
+++ b/
grading/filesys/child-syn-wrt.c
@@
-16,15
+16,15
@@
main (int argc, char *argv[])
quiet = true;
quiet = true;
-
check
(argc == 2, "argc must be 2, actually %d", argc);
+
CHECK
(argc == 2, "argc must be 2, actually %d", argc);
child_idx = atoi (argv[1]);
random_init (0);
random_bytes (buf, sizeof buf);
child_idx = atoi (argv[1]);
random_init (0);
random_bytes (buf, sizeof buf);
-
check
((fd = open (filename)) > 1, "open \"%s\"", filename);
+
CHECK
((fd = open (filename)) > 1, "open \"%s\"", filename);
seek (fd, CHUNK_SIZE * child_idx);
seek (fd, CHUNK_SIZE * child_idx);
-
check
(write (fd, buf + CHUNK_SIZE * child_idx, CHUNK_SIZE) > 0,
+
CHECK
(write (fd, buf + CHUNK_SIZE * child_idx, CHUNK_SIZE) > 0,
"write \"%s\"", filename);
msg ("close \"%s\"", filename);
close (fd);
"write \"%s\"", filename);
msg ("close \"%s\"", filename);
close (fd);