From: Andrey Rys Date: Sun, 28 Nov 2021 13:16:56 +0000 (+0100) Subject: -o: accept "-" as name, do nothing (leave stderr as is) X-Git-Url: https://jxself.org/git/?p=tfcrypt.git;a=commitdiff_plain;h=13cc886eb2edfe7be4e65067be6df01e2f08436a -o: accept "-" as name, do nothing (leave stderr as is) --- 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);