X-Git-Url: http://git.sven.stormbind.net/?p=sven%2Fexfat-utils.git;a=blobdiff_plain;f=fsck%2Fmain.c;h=cda1965225c259abe482e35a321551b19a82786d;hp=67920aa61b6e018e871231993f8fc8fee7291669;hb=0e295d91bb7f18afee1a0b0d587e5a0cf58bf2fb;hpb=f77812e8b678b8bf620bfbf33882139997ccda34 diff --git a/fsck/main.c b/fsck/main.c index 67920aa..cda1965 100644 --- a/fsck/main.c +++ b/fsck/main.c @@ -3,7 +3,7 @@ exFAT file system checker. Free exFAT implementation. - Copyright (C) 2011-2014 Andrew Nayenko + Copyright (C) 2011-2016 Andrew Nayenko This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,10 +20,9 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include #include #include -#include -#include #include #include @@ -34,7 +33,7 @@ uint64_t files_count, directories_count; static int nodeck(struct exfat* ef, struct exfat_node* node) { const cluster_t cluster_size = CLUSTER_SIZE(*ef->sb); - cluster_t clusters = (node->size + cluster_size - 1) / cluster_size; + cluster_t clusters = DIV_ROUND_UP(node->size, cluster_size); cluster_t c = node->start_cluster; int rc = 0; @@ -141,15 +140,14 @@ int main(int argc, char* argv[]) const char* spec = NULL; struct exfat ef; - printf("exfatfsck %u.%u.%u\n", - EXFAT_VERSION_MAJOR, EXFAT_VERSION_MINOR, EXFAT_VERSION_PATCH); + printf("exfatfsck %s\n", VERSION); while ((opt = getopt(argc, argv, "V")) != -1) { switch (opt) { case 'V': - puts("Copyright (C) 2011-2014 Andrew Nayenko"); + puts("Copyright (C) 2011-2016 Andrew Nayenko"); return 0; default: usage(argv[0]);