diff options
author | Nandana Dutt <nandana@google.com> | 2018-11-22 14:02:20 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-11-22 14:02:20 +0000 |
commit | ebad92540553de4f991064548724725bb7e3b87c (patch) | |
tree | d8357979d469d3e487779a7056a503a75c06feec | |
parent | f25cf0661e943e5d80c57d7dbfb61a733a535108 (diff) | |
parent | a7db63415007c9e042cfccd9b7e106f2a21fdb53 (diff) | |
download | native-ebad92540553de4f991064548724725bb7e3b87c.tar.gz |
Merge "Remove unused rename code"
-rw-r--r-- | cmds/dumpstate/dumpstate.cpp | 13 | ||||
-rw-r--r-- | cmds/dumpstate/dumpstate.h | 2 |
2 files changed, 2 insertions, 13 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 94e88775e1..026c260818 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -1100,7 +1100,7 @@ static void RunDumpsysProto(const std::string& title, int priority, } } -// Runs dumpsys on services that must dump first and and will take less than 100ms to dump. +// Runs dumpsys on services that must dump first and will take less than 100ms to dump. static void RunDumpsysCritical() { RunDumpsysText("DUMPSYS CRITICAL", IServiceManager::DUMP_FLAG_PRIORITY_CRITICAL, /* timeout= */ 5s, /* service_timeout= */ 500ms); @@ -1858,17 +1858,6 @@ static void FinalizeFile() { do_text_file = true; } else { do_text_file = false; - // Since zip file is already created, it needs to be renamed. - std::string new_path = ds.GetPath(".zip"); - if (ds.path_ != new_path) { - MYLOGD("Renaming zip file from %s to %s\n", ds.path_.c_str(), new_path.c_str()); - if (rename(ds.path_.c_str(), new_path.c_str())) { - MYLOGE("rename(%s, %s): %s\n", ds.path_.c_str(), new_path.c_str(), - strerror(errno)); - } else { - ds.path_ = new_path; - } - } } } if (do_text_file) { diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h index 5e7f71d78e..35cbdb1096 100644 --- a/cmds/dumpstate/dumpstate.h +++ b/cmds/dumpstate/dumpstate.h @@ -261,7 +261,7 @@ class Dumpstate { std::chrono::milliseconds timeout); /* - * Adds a text entry entry to the existing zip file. + * Adds a text entry to the existing zip file. */ bool AddTextZipEntry(const std::string& entry_name, const std::string& content); |