Commit 8f55de0d authored by Danil Mikhailov's avatar Danil Mikhailov

Merge https://github.com/Danyboy/nocache

merge with github repo
parents 25a6e681 22a28304
......@@ -57,8 +57,10 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
if(st.st_size == 0) {
fprintf(stderr, "%s: file size is 0!\n", argv[1]);
return EXIT_FAILURE;
printf("pages in cache: %d/%d (%.1f%%) [filesize=%.1fK, "
"pagesize=%dK]\n", 0, 0, 0.0,
0.0, PAGESIZE / 1024);
return EXIT_SUCCESS;
}
pages = (st.st_size + PAGESIZE - 1) / PAGESIZE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment