summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/pigz/files/0001-Fix-bug-when-combining-l-with-d.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/pigz/files/0001-Fix-bug-when-combining-l-with-d.patch')
-rw-r--r--meta/recipes-extended/pigz/files/0001-Fix-bug-when-combining-l-with-d.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-extended/pigz/files/0001-Fix-bug-when-combining-l-with-d.patch b/meta/recipes-extended/pigz/files/0001-Fix-bug-when-combining-l-with-d.patch
new file mode 100644
index 0000000000..9c301f2054
--- /dev/null
+++ b/meta/recipes-extended/pigz/files/0001-Fix-bug-when-combining-l-with-d.patch
@@ -0,0 +1,50 @@
1From 65986f3d12d434b9bc428ceb6fcb1f6eeeb2c47d Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 17 Jan 2022 15:36:56 +0800
4Subject: [PATCH] Fix bug when combining -l with -d.
5
6Though it makes no sense to do pigz -ld, that is implicit when
7doing unpigz -l. This commit fixes a bug for that combination.
8
9Upstream-Status: Backport [https://github.com/madler/pigz/commit/326bba44aa102c707dd6ebcd2fc3f413b3119db0]
10
11Signed-off-by: Changqing Li <changqing.li@windriver.com>
12---
13 pigz.c | 14 +++++++-------
14 1 file changed, 7 insertions(+), 7 deletions(-)
15
16diff --git a/pigz.c b/pigz.c
17index f90157f..d648216 100644
18--- a/pigz.c
19+++ b/pigz.c
20@@ -4007,6 +4007,13 @@ local void process(char *path) {
21 }
22 SET_BINARY_MODE(g.ind);
23
24+ // if requested, just list information about the input file
25+ if (g.list && g.decode != 2) {
26+ list_info();
27+ load_end();
28+ return;
29+ }
30+
31 // if decoding or testing, try to read gzip header
32 if (g.decode) {
33 in_init();
34@@ -4048,13 +4055,6 @@ local void process(char *path) {
35 }
36 }
37
38- // if requested, just list information about input file
39- if (g.list) {
40- list_info();
41- load_end();
42- return;
43- }
44-
45 // create output file out, descriptor outd
46 if (path == NULL || g.pipeout) {
47 // write to stdout
48--
492.17.1
50