]> mj.ucw.cz Git - misc.git/commitdiff
fit: better messages.
authorMartin Mares <mj@ucw.cz>
Wed, 9 Jan 2008 08:47:18 +0000 (09:47 +0100)
committerMartin Mares <mj@ucw.cz>
Wed, 9 Jan 2008 08:47:18 +0000 (09:47 +0100)
ucw/fit.c

index b310c120db5bdb14a96985ff8946d9c8bc9bbd5a..a3b2a4f7907e7e71a673f94bcddedb195af26509 100644 (file)
--- a/ucw/fit.c
+++ b/ucw/fit.c
@@ -53,13 +53,15 @@ int main(int argc, char **argv)
   while (!map[max])
     max--;
 
-  printf("Found subset with %d blocks:\n", max);
+  printf("Found subset with %d blocks of %d (%.2f%%):\n", max, m, 100.*max/m);
+  int free = m-max;
   while (max)
     {
       int f = map[max]-2;
       printf("%7d\t%s\n", files[f].blocks, files[f].name);
       max -= files[f].blocks;
     }
+  printf("%7d\t*FREE*\n", free);
 
   return 0;
 }