diff options
author | relan <relan@users.noreply.github.com> | 2010-11-09 19:04:18 +0000 |
---|---|---|
committer | relan <relan@users.noreply.github.com> | 2015-08-24 08:26:12 +0300 |
commit | afac79eae79c1c7ecea2d497b02196307cf282fd (patch) | |
tree | bf774c05f6f833ea4707ed426d95c4ffb0416c46 /fsck | |
parent | 541325a920fc20b0e3fdbfbf09e9833d3aea8ee6 (diff) | |
download | android_external_exfat-afac79eae79c1c7ecea2d497b02196307cf282fd.tar.gz android_external_exfat-afac79eae79c1c7ecea2d497b02196307cf282fd.tar.bz2 android_external_exfat-afac79eae79c1c7ecea2d497b02196307cf282fd.zip |
Use exfat_print_info() in exfatfsck.
Diffstat (limited to 'fsck')
-rw-r--r-- | fsck/main.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/fsck/main.c b/fsck/main.c index fb69df1..3730e30 100644 --- a/fsck/main.c +++ b/fsck/main.c @@ -26,26 +26,8 @@ #define exfat_debug(format, ...) -#define MB (1024 * 1024) - uint64_t files_count, directories_count; -static uint64_t bytes2mb(uint64_t bytes) -{ - return (bytes + MB / 2) / MB; -} - -static void sbck(const struct exfat* ef) -{ - const uint64_t total = (uint64_t) le32_to_cpu(ef->sb->cluster_count) * - CLUSTER_SIZE(*ef->sb); - - printf("Block size %8u bytes\n", BLOCK_SIZE(*ef->sb)); - printf("Cluster size %8u bytes\n", CLUSTER_SIZE(*ef->sb)); - printf("Total space %8"PRIu64" MB\n", bytes2mb(total)); - printf("Used space %8hhu%%\n", ef->sb->allocated_percent); -} - static void nodeck(struct exfat* ef, struct exfat_node* node) { const cluster_t cluster_size = CLUSTER_SIZE(*ef->sb); @@ -127,7 +109,7 @@ static void dirck(struct exfat* ef, const char* path) static void fsck(struct exfat* ef) { - sbck(ef); + exfat_print_info(ef->sb, exfat_count_free_clusters(ef)); dirck(ef, ""); } |