summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-09-02 14:57:18 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-09-02 14:59:32 -0400
commit6b083345307aa1fdbc48eaf247c80b4c4982b2ee (patch)
tree4fb5102e11f12dede475619bad3872e3595a8161 /parse.c
parent302e9987fe732e7e4154386058fff2720fc68fc3 (diff)
downloadbfs-6b083345307aa1fdbc48eaf247c80b4c4982b2ee.tar.xz
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.
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 3 insertions, 1 deletions
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;
}