Merge pull request #129 from fengyichui/master

Fix BLK_SHIFT may be wrong in some platforms #128
This commit is contained in:
Arun Prakash Jana 2018-11-15 18:51:58 +05:30 committed by GitHub
commit dbac97f893
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2905,7 +2905,7 @@ nochange:
cfg.blkorder ^= 1; cfg.blkorder ^= 1;
nftw_fn = &sum_bsizes; nftw_fn = &sum_bsizes;
cfg.apparentsz = 0; cfg.apparentsz = 0;
BLK_SHIFT = 9; BLK_SHIFT = ffs(S_BLKSIZE) - 1;
} }
if (cfg.blkorder) { if (cfg.blkorder) {
@ -3410,6 +3410,7 @@ int main(int argc, char *argv[])
case 'S': case 'S':
cfg.blkorder = 1; cfg.blkorder = 1;
nftw_fn = sum_bsizes; nftw_fn = sum_bsizes;
BLK_SHIFT = ffs(S_BLKSIZE) - 1;
break; break;
case 'l': case 'l':
cfg.showdetail = 0; cfg.showdetail = 0;