[minicoredumper] [PATCH 05/14] minicoredumper: Don't use compression if the compressor is an empty string

Mateusz Moscicki m.moscicki2 at partner.samsung.com
Tue May 21 14:52:41 CEST 2019


Change-Id: Icf41384310aa0fc25499dcabd519268c555e70bc
---
 src/minicoredumper/corestripper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/minicoredumper/corestripper.c b/src/minicoredumper/corestripper.c
index 116b875..fa7a957 100644
--- a/src/minicoredumper/corestripper.c
+++ b/src/minicoredumper/corestripper.c
@@ -1151,7 +1151,7 @@ static int dump_compressed_tar(struct dump_info *di)
 
 	if (!di->cfg->prog_config.core_in_tar)
 		return -1;
-	if (!di->cfg->prog_config.core_compressor)
+	if (!di->cfg->prog_config.core_compressor || !di->cfg->prog_config.core_compressor[0])
 		return -1;
 
 	buf = malloc(PAGESZ);
@@ -1327,7 +1327,7 @@ static int dump_compressed_core(struct dump_info *di)
 	char *buf;
 	int fd;
 
-	if (!di->cfg->prog_config.core_compressor)
+	if (!di->cfg->prog_config.core_compressor || !di->cfg->prog_config.core_compressor[0])
 		return -1;
 
 	buf = malloc(PAGESZ);
-- 
2.7.4




More information about the minicoredumper mailing list