mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Initialize BLK_SHIFT with '-S' option
This commit is contained in:
parent
a86737ea81
commit
5b063c8123
|
@ -3399,9 +3399,6 @@ int main(int argc, char *argv[])
|
||||||
char *ipath = NULL;
|
char *ipath = NULL;
|
||||||
int opt;
|
int opt;
|
||||||
|
|
||||||
// Get platform block 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)) {
|
||||||
fprintf(stderr, "stdin or stdout is not a tty\n");
|
fprintf(stderr, "stdin or stdout is not a tty\n");
|
||||||
|
@ -3413,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;
|
||||||
|
|
Loading…
Reference in a new issue