From 6b083345307aa1fdbc48eaf247c80b4c4982b2ee Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 2 Sep 2021 14:57:18 -0400 Subject: eval: Use 512-byte blocks for -ls when POSIXLY_CORRECT is set This matches the behaviour of GNU find, and allows bfs to match the output of BSD find as well. Fixes #77. --- parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'parse.c') diff --git a/parse.c b/parse.c index 8f34c08..1129ebd 100644 --- a/parse.c +++ b/parse.c @@ -3614,7 +3614,9 @@ struct bfs_ctx *bfs_parse_cmdline(int argc, char *argv[]) { bool stdout_tty = isatty(STDOUT_FILENO); bool stderr_tty = isatty(STDERR_FILENO); - if (!getenv("POSIXLY_CORRECT")) { + if (getenv("POSIXLY_CORRECT")) { + ctx->posixly_correct = true; + } else { ctx->warn = stdin_tty; } -- cgit v1.2.3