|
@@ -417,18 +417,6 @@ static uchar crc8fast(uchar const message[], size_t n) |
|
|
return remainder; |
|
|
return remainder; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* Get platform block shift */ |
|
|
|
|
|
static int get_blk_shift(void) |
|
|
|
|
|
{ |
|
|
|
|
|
int shift; |
|
|
|
|
|
for (shift = 0; shift < 32; ++shift) |
|
|
|
|
|
{ |
|
|
|
|
|
if ((1<<shift) & S_BLKSIZE) |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
return shift; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Messages show up at the bottom */ |
|
|
/* Messages show up at the bottom */ |
|
|
static void printmsg(const char *msg) |
|
|
static void printmsg(const char *msg) |
|
|
{ |
|
|
{ |
|
@@ -2917,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 = get_blk_shift(); |
|
|
|
|
|
|
|
|
BLK_SHIFT = ffs(S_BLKSIZE) - 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (cfg.blkorder) { |
|
|
if (cfg.blkorder) { |
|
@@ -3412,7 +3400,7 @@ int main(int argc, char *argv[]) |
|
|
int opt; |
|
|
int opt; |
|
|
|
|
|
|
|
|
// Get platform block shift |
|
|
// Get platform block shift |
|
|
BLK_SHIFT = get_blk_shift(); |
|
|
|
|
|
|
|
|
BLK_SHIFT = ffs(S_BLKSIZE) - 1; |
|
|
|
|
|
|
|
|
/* Confirm we are in a terminal */ |
|
|
/* Confirm we are in a terminal */ |
|
|
if (!isatty(0) || !isatty(1)) { |
|
|
if (!isatty(0) || !isatty(1)) { |
|
|