From 53ca653abf5b5e550bb5902ad91898e7db00ffed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sun, 1 Jul 2018 21:39:56 -0700 Subject: [PATCH] fix zstd -l processing with closed stdin --- zstd-l-stdin.patch | 70 ++++++++++++++++++++++++++++++++++++++++++++++ zstd.spec | 2 ++ 2 files changed, 72 insertions(+) create mode 100644 zstd-l-stdin.patch diff --git a/zstd-l-stdin.patch b/zstd-l-stdin.patch new file mode 100644 index 0000000..96971e9 --- /dev/null +++ b/zstd-l-stdin.patch @@ -0,0 +1,70 @@ +From 712a9fd9721c314f4b0238577d803b012845f6d2 Mon Sep 17 00:00:00 2001 +From: "W. Felix Handte" +Date: Fri, 29 Jun 2018 15:33:44 -0400 +Subject: [PATCH] Allow Invoking `zstd --list` When `stdin` is not a `tty` + +Also now returns an error when no inputs are given. + +New proposed behavior: + +``` +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l; echo $? +No files given +1 +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst; echo $? +Frames Skips Compressed Uncompressed Ratio Check Filename + 1 0 3.08 KB 10.92 KB 3.544 XXH64 Makefile.zst +0 +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l