From: Martin Mares Date: Wed, 9 Jan 2008 08:47:18 +0000 (+0100) Subject: fit: better messages. X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5a1708a60db27f94298d2eb16645cb6466e2f1b6;p=misc.git fit: better messages. --- diff --git a/ucw/fit.c b/ucw/fit.c index b310c12..a3b2a4f 100644 --- 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; }