arc: Rename use_outfile to out_dir + use as is
Bug: 142684959
Bug: 136273873
Bug: 139379357
Bug: 138805202
Bug: 142685922
Test: adb shell bugreport
Test: atest dumpstate_test
Test: flash android to dut, android-sh, setenforce 1, arc-bugreport
Change-Id: Ia2bb2d4609467d902ce7424d882ed88422867d0b
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index e6bfa14..581d3de 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -2296,8 +2296,7 @@
std::string final_path = ds.path_;
if (ds.options_->OutputToCustomFile()) {
- std::string bugreport_dir = dirname(ds.options_->use_outfile.c_str());
- final_path = ds.GetPath(bugreport_dir, ".zip");
+ final_path = ds.GetPath(ds.options_->out_dir, ".zip");
android::os::CopyFileToFile(ds.path_, final_path);
}
@@ -2418,7 +2417,7 @@
// clang-format off
case 'd': do_add_date = true; break;
case 'z': do_zip_file = true; break;
- case 'o': use_outfile = optarg; break;
+ case 'o': out_dir = optarg; break;
case 's': use_socket = true; break;
case 'S': use_control_socket = true; break;
case 'v': show_header_only = true; break;