fixed ream code; added megabyte output to df

This commit is contained in:
aiju 2012-10-03 18:27:22 +02:00
parent aeb41b90f6
commit 56df14a6a3
2 changed files with 8 additions and 1 deletions

View file

@ -198,7 +198,8 @@ cmddf(int, char **)
n++;
putbuf(b);
}
dprint("hjfs: free %ulld, used %ulld, total %ulld\n", n, sb->sb.size - n, sb->sb.size);
dprint("hjfs: (blocks) free %ulld, used %ulld, total %ulld\n", n, sb->sb.size - n, sb->sb.size);
dprint("hjfs: (MB) free %ulld, used %ulld, total %ulld\n", n * BLOCK / 1048576, (sb->sb.size - n) * BLOCK / 1048576, sb->sb.size * BLOCK / 1048576);
putbuf(sb);
wunlock(fsmain);
return 1;

View file

@ -229,6 +229,12 @@ ream(Fs *fs)
for(; j < je; j++)
c->refs[j] = 1;
}
if(i == b->sb.fend - 1){
j = b->sb.size % REFPERBLK;
if(j != 0)
for(; j < REFPERBLK; j++)
c->refs[j] = -1;
}
c->op |= BWRIM;
putbuf(c);
}