X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=grading%2Ffilesys%2Fchild-syn-wrt.c;h=0a43f5a7f008418eee3bf06fe21068df97289850;hb=37554ba0d6fed50ee5c23bfcfb199c20739e8f28;hp=2a5728153cfb708273873c2ac8d8ca30f9dcec53;hpb=5db27be45b12cc35feb6f1de19861d180e5620fe;p=pintos-anon diff --git a/grading/filesys/child-syn-wrt.c b/grading/filesys/child-syn-wrt.c index 2a57281..0a43f5a 100644 --- 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; - 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); - check ((fd = open (filename)) > 1, "open \"%s\"", filename); + CHECK ((fd = open (filename)) > 1, "open \"%s\"", filename); 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);