projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ignore more files.
[pintos-anon]
/
grading
/
filesys
/
fslib.h
diff --git
a/grading/filesys/fslib.h
b/grading/filesys/fslib.h
index a0e6f32e583841e57e2eaf200c70848180e7ce6b..b1d654fda4b857a84451f14e5462472151de8537 100644
(file)
--- a/
grading/filesys/fslib.h
+++ b/
grading/filesys/fslib.h
@@
-10,7
+10,15
@@
extern bool quiet;
void msg (const char *, ...) PRINTF_FORMAT (1, 2);
void fail (const char *, ...) PRINTF_FORMAT (1, 2) NO_RETURN;
void msg (const char *, ...) PRINTF_FORMAT (1, 2);
void fail (const char *, ...) PRINTF_FORMAT (1, 2) NO_RETURN;
-void check (bool, const char *, ...) PRINTF_FORMAT (2, 3);
+
+#define check(SUCCESS, ...) \
+ do \
+ { \
+ msg (__VA_ARGS__); \
+ if (!(SUCCESS)) \
+ fail (__VA_ARGS__); \
+ } \
+ while (0)
void shuffle (void *, size_t cnt, size_t size);
void shuffle (void *, size_t cnt, size_t size);
@@
-21,6
+29,9
@@
void seq_test (const char *filename,
void check_file (const char *filename, const void *buf, size_t filesize);
void check_file (const char *filename, const void *buf, size_t filesize);
+void compare_bytes (const void *read_data, const void *expected_data,
+ size_t size, size_t ofs, const char *filename);
+
void test_main (void);
#endif /* fslib.h */
void test_main (void);
#endif /* fslib.h */