From edf5a8e98115fe490acde7ff76fa9b2c436bf970 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Wed, 15 May 2019 14:01:44 +0200 Subject: [PATCH] Silence zip command output zip, as any other process, should not pollute our standard output unless explicitly asked to do so. Change-Id: Ied5d31e453c528fffd9662aa5b324e0b7a743dbc --- src/crash-manager/crash-manager.c | 9 +-------- src/log_dump/log_dump.c | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/crash-manager/crash-manager.c b/src/crash-manager/crash-manager.c index ea5b10a..9e7bd49 100644 --- a/src/crash-manager/crash-manager.c +++ b/src/crash-manager/crash-manager.c @@ -912,14 +912,7 @@ static void compress(struct crash_info *cinfo) return; } - char *args[] = { - "/bin/zip", - "-y", - "-r", - zip_path, - cinfo->name, - NULL - }; + char *args[] = {"/bin/zip", "-qyr", zip_path, cinfo->name, NULL}; spawn_param_u param = { .char_ptr = cinfo->temp_dir }; (void)spawn_wait(args, NULL, spawn_chdir, ¶m, ZIP_TIMEOUT_MS, NULL); diff --git a/src/log_dump/log_dump.c b/src/log_dump/log_dump.c index c20149f..aa63f2b 100644 --- a/src/log_dump/log_dump.c +++ b/src/log_dump/log_dump.c @@ -222,7 +222,7 @@ static bool compress(char *const destdir, char *const tempdir, char *const versi } _D("compress tempdir is %s", tempdir); - char *av[] = {"/bin/zip", "-yr", archive_path, ".", NULL}; + char *av[] = {"/bin/zip", "-qyr", archive_path, ".", NULL}; spawn_param_u param = { .char_ptr = tempdir }; bool is_ok = spawn_wait(av, NULL, spawn_chdir, ¶m, 0, exit_code); -- 2.7.4