From 13cc886eb2edfe7be4e65067be6df01e2f08436a Mon Sep 17 00:00:00 2001 From: Andrey Rys Date: Sun, 28 Nov 2021 14:16:56 +0100 Subject: [PATCH] -o: accept "-" as name, do nothing (leave stderr as is) --- VERSION | 2 +- tfcrypt.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 21e72e8..95f9650 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -48 +49 diff --git a/tfcrypt.c b/tfcrypt.c index aa7db33..4eb2b04 100644 --- a/tfcrypt.c +++ b/tfcrypt.c @@ -34,6 +34,8 @@ static void open_log(const char *logfile) { int fd; + if (!strcmp(logfile, "-")) return; + fd = open(logfile, O_WRONLY | O_CREAT | O_LARGEFILE | O_TRUNC, 0666); if (fd == -1) xerror(NO, NO, YES, "%s", logfile); xclose(2); -- 2.31.1