OSDN Git Service

Show in fsck only percentage of used space.
authorrelan <relan@users.noreply.github.com>
Thu, 29 Oct 2009 20:11:08 +0000 (20:11 +0000)
committerrelan <relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:10 +0000 (08:26 +0300)
Absolute used and free space values cannot be calculated accurately.

fsck/main.c

index 9d21049..2867e10 100644 (file)
@@ -50,12 +50,7 @@ static void sbck(const struct exfat* ef)
        printf("Block size            %8u bytes\n", block_size);
        printf("Cluster size          %8u bytes\n", cluster_size);
        printf("Total space           %8"PRIu64" MB\n", bytes2mb(total));
-       printf("Used space            %8"PRIu64" MB (%hhu%%)\n",
-                       bytes2mb(total * ef->sb->allocated_percent / 100),
-                       ef->sb->allocated_percent);
-       printf("Free space            %8"PRIu64" MB (%hhu%%)\n",
-                       bytes2mb(total * (100 - ef->sb->allocated_percent) / 100),
-                       100 - ef->sb->allocated_percent);
+       printf("Used space            %8hhu%%\n", ef->sb->allocated_percent);
 }
 
 static void dirck(struct exfat* ef, const char* path)