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
diff --git a/cmds/dumpstate/DumpstateService.cpp b/cmds/dumpstate/DumpstateService.cpp
index 0ee6c3a..f2678eb 100644
--- a/cmds/dumpstate/DumpstateService.cpp
+++ b/cmds/dumpstate/DumpstateService.cpp
@@ -137,6 +137,7 @@
dprintf(fd, "extra_options: %s\n", ds_.options_->extra_options.c_str());
dprintf(fd, "version: %s\n", ds_.version_.c_str());
dprintf(fd, "bugreport_dir: %s\n", ds_.bugreport_dir_.c_str());
+ dprintf(fd, "bugreport_internal_dir_: %s\n", ds_.bugreport_internal_dir_.c_str());
dprintf(fd, "screenshot_path: %s\n", ds_.screenshot_path_.c_str());
dprintf(fd, "log_path: %s\n", ds_.log_path_.c_str());
dprintf(fd, "tmp_path: %s\n", ds_.tmp_path_.c_str());