From c3151e4190cc64697644b47a5f0e8068c38fca9f Mon Sep 17 00:00:00 2001 From: SalmaxChang Date: Thu, 21 Apr 2022 20:57:42 +0800 Subject: [PATCH] dumpstate: change log compression timeout to 20s The duration of dumpstate board binary is only 45s. Change the log compression timeout from 120s to 20s. Bug: 229932116 Change-Id: I4f3ebe0c89db50a3ad7071fe730585a391f7ac81 --- dumpstate/Dumpstate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index 2740484b..aaec2521 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -108,7 +108,7 @@ void Dumpstate::dumpLogs(int fd, std::string srcDir, std::string destDir, int ma std::string copyCmd = "/vendor/bin/cp " + srcLogFile + " " + destLogFile; ALOGD("Copying %s to %s\n", srcLogFile.c_str(), destLogFile.c_str()); - RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); + RunCommandToFd(fd, "CP LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); } while (num_entries--) { @@ -1148,7 +1148,7 @@ void Dumpstate::dumpModem(int fd, int fdModem) dumpModemEFS(modemLogAllDir); } - RunCommandToFd(fd, "TAR LOG", {"/vendor/bin/tar", "cvf", modemLogCombined.c_str(), "-C", modemLogAllDir.c_str(), "."}, CommandOptions::WithTimeout(120).Build()); + RunCommandToFd(fd, "TAR LOG", {"/vendor/bin/tar", "cvf", modemLogCombined.c_str(), "-C", modemLogAllDir.c_str(), "."}, CommandOptions::WithTimeout(20).Build()); RunCommandToFd(fd, "CHG PERM", {"/vendor/bin/chmod", "a+w", modemLogCombined.c_str()}, CommandOptions::WithTimeout(2).Build()); std::vector buffer(65536);