diff options
| author | 2018-11-30 16:48:55 +0000 | |
|---|---|---|
| committer | 2018-12-06 10:05:03 +0000 | |
| commit | 979388ef5d5876a63679ee04da9ded996817f04f (patch) | |
| tree | 84eac8db441c623a69079c0d92036f08471aa6ea /cmds/dumpstate/utils.cpp | |
| parent | d1842c438698e12ebb214b64476a793cf5da8a04 (diff) | |
Accept a file descriptor to write bugreport file
This will be used via the bugreporting api.
Changed dumpstate to do bugreport generation in its own directory
in the beginning and to copy over to the destination fd or directory
at the very end.
BUG: 111441001
Test: adb bugreport
Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test
Test: interactive bugreport
Change-Id: I83e24f0989a202e84266b6e0fdf8edc14ea639bf
Diffstat (limited to 'cmds/dumpstate/utils.cpp')
| -rw-r--r-- | cmds/dumpstate/utils.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp index 6cbb691676..d97ffbf2ed 100644 --- a/cmds/dumpstate/utils.cpp +++ b/cmds/dumpstate/utils.cpp @@ -229,7 +229,11 @@ bool Dumpstate::IsZipping() const { } std::string Dumpstate::GetPath(const std::string& suffix) const { - return android::base::StringPrintf("%s/%s-%s%s", bugreport_dir_.c_str(), base_name_.c_str(), + return GetPath(bugreport_internal_dir_, suffix); +} + +std::string Dumpstate::GetPath(const std::string& directory, const std::string& suffix) const { + return android::base::StringPrintf("%s/%s-%s%s", directory.c_str(), base_name_.c_str(), name_.c_str(), suffix.c_str()); } |