Merge "bootstat: clear persist.sys.boot.reason once read"
diff --git a/adb/client/commandline.cpp b/adb/client/commandline.cpp
index 39983ab..06fcf16 100644
--- a/adb/client/commandline.cpp
+++ b/adb/client/commandline.cpp
@@ -1136,8 +1136,7 @@
cmd += " " + escape_arg(*argv++);
}
- // No need for shell protocol with logcat, always disable for simplicity.
- return send_shell_command(cmd, true);
+ return send_shell_command(cmd);
}
static void write_zeros(int bytes, int fd) {
@@ -1861,7 +1860,7 @@
cmd += " " + escape_arg(*argv++);
}
- return send_shell_command(cmd, false);
+ return send_shell_command(cmd);
}
static int install_app(int argc, const char** argv) {
@@ -2049,7 +2048,7 @@
cmd += " " + escape_arg(*argv++);
}
- return send_shell_command(cmd, false);
+ return send_shell_command(cmd);
}
static int uninstall_app_legacy(int argc, const char** argv) {
@@ -2073,7 +2072,7 @@
static int delete_file(const std::string& filename) {
std::string cmd = "rm -f " + escape_arg(filename);
- return send_shell_command(cmd, false);
+ return send_shell_command(cmd);
}
static int install_app_legacy(int argc, const char** argv) {
diff --git a/adb/client/commandline.h b/adb/client/commandline.h
index 36cd798..3d10030 100644
--- a/adb/client/commandline.h
+++ b/adb/client/commandline.h
@@ -92,7 +92,7 @@
// resulting output.
// if |callback| is non-null, stdout/stderr output will be handled by it.
int send_shell_command(
- const std::string& command, bool disable_shell_protocol,
- StandardStreamsCallbackInterface* callback = &DEFAULT_STANDARD_STREAMS_CALLBACK);
+ const std::string& command, bool disable_shell_protocol = false,
+ StandardStreamsCallbackInterface* callback = &DEFAULT_STANDARD_STREAMS_CALLBACK);
#endif // COMMANDLINE_H
diff --git a/fs_mgr/tools/dmctl.cpp b/fs_mgr/tools/dmctl.cpp
index f5bdc35..b40b83a 100644
--- a/fs_mgr/tools/dmctl.cpp
+++ b/fs_mgr/tools/dmctl.cpp
@@ -38,12 +38,12 @@
using DmBlockDevice = ::android::dm::DeviceMapper::DmBlockDevice;
static int Usage(void) {
- std::cerr << "usage: dmctl <command> [command options]";
- std::cerr << "commands:";
- std::cerr << " create <dm-name> [dm-target> [-lo <filename>] <dm-target-args>]";
- std::cerr, " delete <dm-name>";
- std::cerr, " list <devices | targets>";
- std::cerr, " help";
+ std::cerr << "usage: dmctl <command> [command options]" << std::endl;
+ std::cerr << "commands:" << std::endl;
+ std::cerr << " create <dm-name> [<dm-target> [-lo <filename>] <dm-target-args>]" << std::endl;
+ std::cerr << " delete <dm-name>" << std::endl;
+ std::cerr << " list <devices | targets>" << std::endl;
+ std::cerr << " help" << std::endl;
return -EINVAL;
}
diff --git a/init/uevent_listener.cpp b/init/uevent_listener.cpp
index 81486e1..24b14c4 100644
--- a/init/uevent_listener.cpp
+++ b/init/uevent_listener.cpp
@@ -23,11 +23,7 @@
#include <memory>
-#include <android-base/chrono_utils.h>
-#include <android-base/file.h>
#include <android-base/logging.h>
-#include <android-base/scopeguard.h>
-#include <android-base/stringprintf.h>
#include <cutils/uevent.h>
namespace android {
@@ -134,19 +130,9 @@
int fd = openat(dfd, "uevent", O_WRONLY);
if (fd >= 0) {
- android::base::Timer t;
write(fd, "add\n", 4);
- const std::string fd_path = android::base::StringPrintf("/proc/self/fd/%d", fd);
- std::string uevent_file_path;
- android::base::Readlink(fd_path, &uevent_file_path);
close(fd);
- auto guard = android::base::make_scope_guard([&t, &uevent_file_path]() {
- if (t.duration() > 50ms) {
- LOG(WARNING) << "ReadUevent took " << t << " on '" << uevent_file_path << "'";
- }
- });
-
Uevent uevent;
while (ReadUevent(&uevent)) {
if (callback(uevent) == ListenerAction::kStop) return ListenerAction::kStop;
diff --git a/mkbootimg/OWNERS b/mkbootimg/OWNERS
index 39448cf..3a00860 100644
--- a/mkbootimg/OWNERS
+++ b/mkbootimg/OWNERS
@@ -1 +1,2 @@
+hridya@google.com
tbao@google.com