fixed ream code; added megabyte output to df
This commit is contained in:
parent
aeb41b90f6
commit
56df14a6a3
2 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue