From 513166f7813792ee551fa9818663c7aaf4ec08c3 Mon Sep 17 00:00:00 2001 From: SalmaxChang Date: Wed, 20 Apr 2022 18:15:20 +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: I2403ade04d69773b91ee90f591d40416ed684f71 --- dumpstate/DumpstateDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index d0b473e1..3b6a1552 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -110,7 +110,7 @@ void DumpstateDevice::dumpLogs(int fd, std::string srcDir, std::string destDir, 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--) { @@ -1144,7 +1144,7 @@ void DumpstateDevice::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);