silent = (DEBUG == 0)

上级 f619c7ea
......@@ -34,6 +34,8 @@ typedef uint64_t u64;
#define BSIZ (DIRSIZ+1)
#endif
static const bool silent = (DEBUG == 0);
static size_t
du(int fd)
{
......@@ -74,7 +76,9 @@ main(int ac, char **av)
perf_start(PERF_SELECTOR, PERF_PERIOD);
s = du(open(".", 0));
perf_stop();
printf("%ld\n", s);
wq_dump();
if (!silent) {
printf("%ld\n", s);
wq_dump();
}
return 0;
}
......@@ -34,7 +34,7 @@
#define xfstatat fstatat
#endif
static const bool silent = false;
static const bool silent = (DEBUG == 0);
void
ls(const char *path)
......@@ -96,6 +96,7 @@ main(int argc, char *argv[])
}
perf_stop();
wq_dump();
if (!silent)
wq_dump();
return 0;
}
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论