]> mj.ucw.cz Git - misc.git/blobdiff - ucw/ddigger.c
Merge branch 'master' of git+ssh://git.ucw.cz/home/mj/GIT/misc
[misc.git] / ucw / ddigger.c
index 4902979c21fb08dbc658a66d438e4a73fd987d68..9c158cfb655942afdc157eb0eea9e3a402aa368f 100644 (file)
@@ -74,13 +74,19 @@ static u64 stat_have(void)
 static void stat_show(void)
 {
   u64 last = 0;
 static void stat_show(void)
 {
   u64 last = 0;
+  u64 total_missing = 0;
   for (uint i=0; i<GARY_SIZE(status); i++)
     {
       if (status[i].pos > last)
   for (uint i=0; i<GARY_SIZE(status); i++)
     {
       if (status[i].pos > last)
-       printf("Missing: %ju +%ju\n", (intmax_t) last, (intmax_t)(status[i].pos - last));
+       {
+         u64 miss = status[i].pos - last;
+         printf("Missing: %ju +%ju\n", (intmax_t) last, (intmax_t) miss);
+         total_missing += miss;
+       }
       last = status[i].pos + status[i].len;
     }
   printf("End at %ju\n", (intmax_t) last);
       last = status[i].pos + status[i].len;
     }
   printf("End at %ju\n", (intmax_t) last);
+  printf("Total missing: %ju\n", (intmax_t) total_missing);
 }
 
 static struct opt_section options = {
 }
 
 static struct opt_section options = {